/* ===========================================================================
   ShopTools AI — Shared Design System (v3.0 multi-page)
   Cute + Professional balance
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Cute professional palette */
    --c-coral: #ff8fa3;
    --c-coral-deep: #ff6b9d;
    --c-lavender: #a78bfa;
    --c-mint: #5eead4;
    --c-mint-deep: #14b8a6;
    --c-sun: #fcd34d;
    --c-peach: #fdba74;
    --c-sky: #93c5fd;
    --c-bg: #fefbf6;
    --c-bg-soft: #fff7ed;
    --c-text: #1f2937;
    --c-text-soft: #4b5563;
    --c-text-muted: #9ca3af;
    --c-border: #fde68a;
    --c-border-soft: #f3f4f6;
    --c-shadow: rgba(255, 143, 163, 0.15);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 999px;

    --shadow-sm: 0 2px 8px rgba(255, 143, 163, 0.08);
    --shadow-md: 0 6px 20px rgba(255, 143, 163, 0.15);
    --shadow-lg: 0 16px 40px rgba(255, 143, 163, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Plus Jakarta Sans', 'Inter', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    min-height: 100vh;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--c-text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ===========================================================================
   NAV (shared across pages)
   =========================================================================== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(254, 251, 246, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}
.nav-inner {
    max-width: 1180px; margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 17px;
}
.nav-brand-mark {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--c-coral) 0%, var(--c-lavender) 100%);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 17px; font-weight: 900;
    box-shadow: 0 4px 12px rgba(255, 143, 163, 0.4);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    color: var(--c-text-soft);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.15s;
}
.nav-link:hover { background: var(--c-bg-soft); color: var(--c-text); }
.nav-link.active {
    background: linear-gradient(135deg, var(--c-coral) 0%, var(--c-lavender) 100%);
    color: white;
}
.nav-cta {
    padding: 9px 18px;
    border-radius: var(--radius-full);
    background: var(--c-text);
    color: white;
    font-weight: 700; font-size: 13px;
    transition: transform 0.1s;
}
.nav-cta:hover { transform: translateY(-1px); }
@media (max-width: 720px) {
    .nav-links { display: none; }
}

/* ===========================================================================
   BUTTONS
   =========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    border: none;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--c-coral) 0%, var(--c-lavender) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 143, 163, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 143, 163, 0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: white;
    color: var(--c-text);
    border: 2px solid var(--c-border);
}
.btn-secondary:hover { border-color: var(--c-coral); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 18px 36px; font-size: 17px; }

/* ===========================================================================
   CARDS
   =========================================================================== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border-soft);
    transition: all 0.15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ===========================================================================
   HERO with image bg
   =========================================================================== */
.hero {
    position: relative;
    min-height: 80vh;
    background: linear-gradient(180deg, #fefbf6 0%, #fff 100%);
    overflow: hidden;
}
.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
    pointer-events: none;
}
.hero-mask {
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(254, 251, 246, 0) 0%,
        rgba(254, 251, 246, 0.15) 15%,
        rgba(254, 251, 246, 0.30) 30%,
        rgba(254, 251, 246, 0.45) 45%,
        var(--c-bg) 100%
    );
    pointer-events: none;
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 1100px; margin: 0 auto;
    padding: 80px 24px 60px;
    text-align: center;
}

/* ===========================================================================
   SECTIONS
   =========================================================================== */
.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 24px;
}
.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 12px;
}
.section-subtitle {
    text-align: center;
    color: var(--c-text-soft);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto 48px;
}

/* ===========================================================================
   FORMS (for function pages)
   =========================================================================== */
.form-wrap {
    max-width: 760px;
    margin: 40px auto 0;
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--c-border-soft);
}
.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--c-text);
}
.field label .req { color: var(--c-coral); }
.field label .opt {
    color: var(--c-text-muted);
    font-weight: 500;
    font-size: 12px;
    margin-left: 4px;
}
.input, .textarea, .select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--c-border-soft);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--c-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--c-coral);
    box-shadow: 0 0 0 4px rgba(255, 143, 163, 0.12);
}
.textarea { resize: vertical; min-height: 80px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--c-bg);
    border: 2px solid var(--c-border-soft);
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-soft);
    cursor: pointer;
    transition: all 0.1s;
}
.chip:hover { border-color: var(--c-coral); }
.chip.selected { background: var(--c-coral); color: white; border-color: var(--c-coral); }

/* ===========================================================================
   RESULT AREA
   =========================================================================== */
.result {
    max-width: 760px;
    margin: 24px auto;
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--c-border-soft);
}
.result img { border-radius: var(--radius-md); margin-bottom: 14px; }
.result pre {
    background: var(--c-bg);
    padding: 16px;
    border-radius: var(--radius-md);
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ===========================================================================
   FOOTER
   =========================================================================== */
.footer {
    background: var(--c-text);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 24px 32px;
    margin-top: 80px;
}
.footer-inner {
    max-width: 1180px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand-mark {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--c-coral) 0%, var(--c-lavender) 100%);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 15px; font-weight: 900;
}
.footer-brand-name { color: white; font-weight: 800; font-size: 16px; }
.footer-col h4 { color: white; font-size: 14px; margin-bottom: 12px; }
.footer-col a { display: block; padding: 4px 0; font-size: 14px; transition: color 0.1s; }
.footer-col a:hover { color: var(--c-coral); }
.footer-bottom {
    max-width: 1180px; margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between;
    font-size: 13px;
}

/* ===========================================================================
   Utility
   =========================================================================== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(255,143,163,0.15), rgba(167,139,250,0.15));
    color: var(--c-coral-deep);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
}
