/* ==========================================================================
   FACOMERCAI — Demo Premium: Retail / Tienda
   Design language matches molde demo-taxes (navy + gold, serif headings).
   Self-contained, mobile-first, WCAG AA contrast.
   ========================================================================== */

:root {
    --primary-navy: #0f2438;
    --primary-navy-soft: #16314c;
    --accent-gold: #c9a14a;
    --accent-gold-soft: #e3c987;
    --accent-red: #c0392b;
    --accent-emerald: #1f9d6b;

    --bg-white: #ffffff;
    --bg-light: #f6f8fb;
    --bg-dark: #0c1d2e;

    --text-dark: #1c2733;
    --text-muted: #5a6b7b;
    --text-light: #ffffff;

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-sm: 0 2px 8px rgba(15, 36, 56, 0.08);
    --shadow-md: 0 10px 30px rgba(15, 36, 56, 0.12);
    --shadow-lg: 0 20px 50px rgba(15, 36, 56, 0.18);

    --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; color: var(--primary-navy); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-align: center;
}
.btn:focus-visible { outline: 3px solid var(--accent-gold-soft); outline-offset: 2px; }
.btn-primary { background: var(--accent-gold); color: var(--primary-navy); }
.btn-primary:hover { background: var(--accent-gold-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary-navy); border-color: var(--primary-navy); }
.btn-outline:hover { background: var(--primary-navy); color: #fff; transform: translateY(-2px); }
.btn-whatsapp { background: #25D366; color: #06301c; }
.btn-whatsapp:hover { background: #1ebe5b; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Navbar ---------- */
.navbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 36, 56, 0.08);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--font-serif); font-weight: 700; font-size: 1.4rem; color: var(--primary-navy); display: flex; align-items: center; gap: 0.5rem; }
.logo i { color: var(--accent-gold); }
.logo span { color: var(--accent-gold); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary-navy); }
.lang-toggle {
    background: transparent; border: 1px solid var(--primary-navy); color: var(--primary-navy);
    border-radius: 999px; width: 42px; height: 34px; font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.lang-toggle:hover { background: var(--primary-navy); color: #fff; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #f6f8fb 0%, #eaf0f7 100%);
    padding: 4.5rem 0 5rem;
    overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
.hero-subtitle {
    display: inline-block; color: var(--accent-gold); font-weight: 700; font-size: 0.82rem;
    letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1rem;
}
.hero-content h1 { margin-bottom: 1.1rem; }
.hero-content > p { color: var(--text-muted); font-size: 1.1rem; max-width: 36rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2rem; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.badge { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.badge i { color: var(--accent-emerald); }
.hero-image img, .hero-image .photo-slot { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }

/* ---------- Photo slots (premium placeholders) ---------- */
.photo-slot {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.6rem;
    background:
        repeating-linear-gradient(45deg, rgba(201,161,74,0.06) 0 14px, transparent 14px 28px),
        linear-gradient(135deg, #17314c 0%, #0f2438 100%);
    color: rgba(255, 255, 255, 0.78);
    border: 1px dashed rgba(201, 161, 74, 0.5);
    border-radius: var(--radius-md);
    text-align: center;
    aspect-ratio: 4 / 3;
    padding: 1.5rem;
}
.photo-slot.tall { aspect-ratio: 3 / 4; }
.photo-slot.wide { aspect-ratio: 16 / 9; }
.photo-slot i { font-size: 2rem; color: var(--accent-gold); }
.photo-slot .slot-label { font-weight: 600; font-size: 0.95rem; }
.photo-slot .slot-hint { font-size: 0.78rem; opacity: 0.7; letter-spacing: 0.5px; text-transform: uppercase; }

/* ---------- Fotos reales (2026-08-08, ver CENTRO_DE_MANDO/FOTOS_DEMOS_2026-08-08) ---------- */
.demo-photo {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.demo-photo.tall { aspect-ratio: 3 / 4; }
.demo-photo.wide { aspect-ratio: 16 / 9; }
.demo-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.photo-credit {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font: 600 11px/1.3 'Inter', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
    background: rgba(15, 36, 56, 0.6);
    padding: 4px 9px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}
.photo-credit:hover, .photo-credit:focus { text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-light { background: var(--bg-light); }
.section-dark { background: var(--primary-navy); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head .super { color: var(--accent-gold); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.82rem; display: block; margin-bottom: 0.8rem; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Feature grid (lo que automatizamos) ---------- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.75rem; }
.feature-card {
    background: var(--bg-white); border-radius: var(--radius-md); padding: 2rem 1.75rem;
    box-shadow: var(--shadow-sm); border: 1px solid rgba(15, 36, 56, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-soft) 100%);
    color: var(--primary-navy); font-size: 1.4rem; margin-bottom: 1.1rem;
}
.feature-card h3 { margin-bottom: 0.6rem; }
.feature-card p { color: var(--text-muted); font-size: 0.96rem; }
.feature-tag {
    display: inline-block; margin-top: 0.9rem; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent-emerald);
}

/* ---------- "Míralo funcionando" mockup ---------- */
.showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.mock-panel {
    background: var(--bg-white); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    overflow: hidden; border: 1px solid rgba(15, 36, 56, 0.08);
}
.mock-bar { background: var(--primary-navy); color: #fff; padding: 0.85rem 1.1rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; }
.mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-bar .dot.r { background: #ff5f57; } .mock-bar .dot.y { background: #febc2e; } .mock-bar .dot.g { background: #28c840; }
.mock-bar .mock-title { margin-left: 0.5rem; }
.mock-body { padding: 1.25rem; }
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0.5rem; border-bottom: 1px solid rgba(15,36,56,0.06); font-size: 0.92rem; }
.mock-row:last-child { border-bottom: none; }
.mock-row .sku { color: var(--text-muted); font-size: 0.8rem; }
.pill { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.pill.low { background: rgba(192,57,43,0.12); color: var(--accent-red); }
.pill.ok { background: rgba(31,157,107,0.12); color: var(--accent-emerald); }
.pill.po { background: rgba(201,161,74,0.18); color: #8a6d22; }
.metrics-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.metric-box { background: var(--bg-white); border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); }
.metric-box .num { font-size: 1.6rem; font-weight: 800; color: var(--primary-navy); font-family: var(--font-serif); }
.metric-box .lbl { color: var(--text-muted); font-size: 0.82rem; }

/* ---------- About / stats ---------- */
.about-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 3rem; align-items: center; }
.about-grid .super { color: var(--accent-gold); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.82rem; display: block; margin-bottom: 1rem; }
.about-grid p { color: rgba(255,255,255,0.82); margin-bottom: 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.75rem; }
.stat-item { background: rgba(255,255,255,0.06); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.stat-number { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700; color: var(--accent-gold); }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

/* ---------- Plans ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.75rem; align-items: stretch; }
.plan-card {
    background: var(--bg-white); border-radius: var(--radius-md); padding: 2.25rem 1.75rem;
    box-shadow: var(--shadow-sm); border: 1px solid rgba(15,36,56,0.08);
    display: flex; flex-direction: column; position: relative;
}
.plan-card.featured { border: 2px solid var(--accent-gold); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent-gold); color: var(--primary-navy); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 0.35rem 1rem; border-radius: 999px; }
.plan-name { font-family: var(--font-serif); font-size: 1.5rem; color: var(--primary-navy); margin-bottom: 0.4rem; }
.plan-price { font-size: 2.4rem; font-weight: 800; color: var(--primary-navy); font-family: var(--font-serif); }
.plan-price small { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); font-family: var(--font-sans); }
.plan-desc { color: var(--text-muted); font-size: 0.92rem; margin: 0.5rem 0 1.25rem; }
.plan-features { list-style: none; margin-bottom: 1.75rem; flex-grow: 1; }
.plan-features li { padding: 0.5rem 0; font-size: 0.93rem; display: flex; align-items: flex-start; gap: 0.6rem; color: var(--text-dark); }
.plan-features li i { color: var(--accent-emerald); margin-top: 0.25rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--bg-white); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); margin-bottom: 0.9rem; overflow: hidden; border: 1px solid rgba(15,36,56,0.06); }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 1.25rem 1.4rem; font-weight: 600; font-size: 1rem; color: var(--primary-navy); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font-sans); }
.faq-q i { transition: transform 0.2s ease; color: var(--accent-gold); }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 1.4rem 1.25rem; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-soft) 100%); border-radius: var(--radius-lg); padding: 3rem 2rem; text-align: center; color: #fff; }
.cta-band h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-band p { color: rgba(255,255,255,0.82); max-width: 540px; margin: 0 auto 1.75rem; }
.cta-band .hero-actions { justify-content: center; margin-bottom: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-dark); color: #fff; padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer h4 { color: var(--accent-gold); font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 1rem; }
.footer p { color: rgba(255,255,255,0.7); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a, .footer-links span { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent-gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* ---------- Demo watermark ---------- */
.demo-watermark {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    background: rgba(201,161,74,0.95); color: var(--primary-navy);
    font-weight: 800; font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
    padding: 0.3rem 0.9rem; border-radius: 999px; z-index: 60; box-shadow: var(--shadow-sm);
    pointer-events: none;
}

/* ---------- Chatbot ---------- */
.chatbot-widget { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 70; }
.chatbot-toggle { width: 60px; height: 60px; border-radius: 50%; background: var(--accent-gold); color: var(--primary-navy); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow-md); }
.chatbot-toggle:hover { background: var(--accent-gold-soft); }
.chatbot-window { position: absolute; bottom: 76px; right: 0; width: 320px; max-width: calc(100vw - 3rem); background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; display: none; }
.chatbot-window.open { display: block; }
.chatbot-header { background: var(--primary-navy); color: #fff; padding: 1rem; display: flex; align-items: center; justify-content: space-between; }
.chatbot-header h3 { color: #fff; font-size: 1rem; display: inline; font-family: var(--font-sans); }
.chatbot-close { cursor: pointer; }
.chatbot-body { padding: 1rem; max-height: 280px; overflow-y: auto; background: var(--bg-light); }
.chat-message { margin-bottom: 0.75rem; }
.chat-message.bot p { background: #fff; border-radius: var(--radius-sm); padding: 0.75rem; font-size: 0.9rem; box-shadow: var(--shadow-sm); }
.chat-message.user p { background: var(--accent-gold); color: var(--primary-navy); border-radius: var(--radius-sm); padding: 0.75rem; font-size: 0.9rem; margin-left: 2rem; }
.chatbot-input { display: flex; border-top: 1px solid rgba(15,36,56,0.08); }
.chatbot-input input { flex: 1; border: none; padding: 0.85rem; font-size: 0.9rem; outline: none; }
.chatbot-input button { border: none; background: var(--accent-gold); color: var(--primary-navy); padding: 0 1.1rem; cursor: pointer; }

/* ---------- Responsive (mobile-first refinements) ---------- */
@media (max-width: 900px) {
    .hero .container, .about-grid, .showcase-grid { grid-template-columns: 1fr; }
    .about-grid .about-image { order: -1; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}
@media (max-width: 520px) {
    .section { padding: 3.5rem 0; }
    .hero { padding: 3rem 0 3.5rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .metrics-row { grid-template-columns: 1fr; }
    .btn { width: 100%; }
    .hero-actions .btn, .cta-band .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
