/* Glowwe Lab | Million-Dollar UI Framework 
    Full Responsive Guest Interface
*/

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

:root {
    /* Brand Colors */
    --glowwe-pink: #f1729a;
    --glowwe-pink-light: #fdf2f5;
    --glowwe-black: #0f172a;
    --glowwe-white: #ffffff;
    --glowwe-bg: #f8fafc;
    --glowwe-text: #475569;
    --glowwe-border: #e2e8f0;
    
    /* Safety & Status Colors */
    --safe-bg: #ecfdf5;    --safe-text: #059669;
    --caution-bg: #fffbeb; --caution-text: #d97706;
    --avoid-bg: #fef2f2;   --avoid-text: #dc2626;
    
    /* Shadows & Elevation */
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 20px 40px -10px rgba(241, 114, 154, 0.08);
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--glowwe-bg);
    color: var(--glowwe-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   NAVIGATION (Sticky & Glassmorphism)
   ========================================================= */

.top-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--glowwe-black);
    letter-spacing: -0.5px;
}
.nav-brand span { color: var(--glowwe-pink); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--glowwe-black);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
.back-link:hover { color: var(--glowwe-pink); }

/* =========================================================
   HOME & SEARCH (index.php)
   ========================================================= */

.guest-container {
    width: 100%;
    margin: 0;
    min-height: 100vh;
    background: var(--glowwe-white);
}

.hero-section {
    width: 100%;
    padding: 6rem 2rem;
    text-align: center;
    background: var(--glowwe-black);
    color: var(--glowwe-white);
    border-bottom: 4px solid var(--glowwe-pink);
}

.brand-logo {
    font-size: 4rem; 
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
}
.brand-logo span { color: var(--glowwe-pink); }

.tagline {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 1.5rem 2rem;
    border-radius: 99px;
    border: none;
    font-size: 1.2rem;
    outline: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.search-btn {
    background: var(--glowwe-pink);
    color: white;
    border: none;
    padding: 0 3rem;
    border-radius: 99px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.search-btn:hover { background: #d95b82; transform: scale(1.02); }

/* Grid for Search Results */
.results-section {
    max-width: 1400px; 
    margin: 0 auto;
    padding: 4rem 2rem;
}

.ingredient-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.ingredient-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: var(--glowwe-white);
    border: 1px solid var(--glowwe-border);
    padding: 2rem;
    border-radius: 24px;
    color: inherit;
    transition: all 0.3s ease;
}
.ingredient-card:hover {
    border-color: var(--glowwe-pink);
    box-shadow: var(--shadow-card);
    transform: translateY(-4px);
}

/* =========================================================
   INGREDIENT DETAIL PAGE (ingredient.php)
   ========================================================= */

.content-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.premium-header { text-align: center; margin-bottom: 3.5rem; }

.ingredient-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--glowwe-black);
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
}

.category-badge {
    display: inline-block;
    background: var(--glowwe-pink-light);
    color: var(--glowwe-pink);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.skin-type-banner {
    display: inline-block;
    background: #f1f5f9;
    color: var(--glowwe-text);
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    margin-top: 1rem;
}

/* Highlight Card (Cheat Sheet Replacement) */
.highlight-card {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #fdf2f5 100%);
    padding: 2.5rem;
    border-radius: 28px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(241, 114, 154, 0.1);
    margin-bottom: 4rem;
}
.highlight-icon { font-size: 2.5rem; }
.highlight-content p {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--glowwe-black);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

/* Metrics Dashboard */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 4rem;
}

.metric-card {
    background: var(--glowwe-white);
    padding: 1.75rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--glowwe-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-title {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.big-number { font-size: 2.8rem; font-weight: 800; color: var(--glowwe-black); line-height: 1; }
.out-of { font-size: 1.1rem; color: #94a3b8; font-weight: 600; }

.badge-lg {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    border-radius: 99px;
    font-weight: 800;
    text-transform: uppercase;
}
.badge.safe { background: var(--safe-bg); color: var(--safe-text); }
.badge.caution, .badge.consult-doctor { background: var(--caution-bg); color: var(--caution-text); }
.badge.avoid { background: var(--avoid-bg); color: var(--avoid-text); }

/* Tooltips */
.tooltip-wrap { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.info-icon {
    width: 18px; height: 18px; border-radius: 50%; background: #cbd5e1;
    color: white; font-size: 11px; font-weight: 800; display: flex;
    align-items: center; justify-content: center; cursor: help;
}
.info-icon .tooltip {
    visibility: hidden; width: 220px; background: var(--glowwe-black);
    color: #fff; text-align: center; border-radius: 10px; padding: 10px;
    position: absolute; z-index: 100; bottom: 150%; left: 50%;
    margin-left: -110px; opacity: 0; transition: opacity 0.2s; font-size: 0.85rem;
}
.info-icon:hover .tooltip { visibility: visible; opacity: 1; }

/* Status Indicators */
.indicator-dot { width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; display: inline-block; }
.dot-green { background: #10b981; }
.dot-orange { background: #f59e0b; }
.dot-red { background: #ef4444; }

/* Mythbuster Card */
.mythbuster-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 4rem;
}
.myth-header {
    display: flex; align-items: center; gap: 0.75rem; color: #b45309;
    font-weight: 800; font-size: 1.1rem; text-transform: uppercase; margin-bottom: 1.25rem;
}
.the-myth { color: var(--glowwe-text); font-style: italic; font-size: 1.15rem; margin-bottom: 0.75rem; }
.the-fact { color: var(--glowwe-black); font-size: 1.2rem; font-weight: 600; }

/* Story Content */
.story-section { margin-bottom: 4.5rem; }
.section-title {
    display: flex; align-items: center; gap: 0.8rem; font-size: 1.8rem;
    font-weight: 800; color: var(--glowwe-black); margin-bottom: 1.5rem; letter-spacing: -0.5px;
}
.prose p { font-size: 1.2rem; color: var(--glowwe-text); margin-bottom: 1.5rem; }

.benefits-box, .pro-tip-box {
    padding: 2rem; border-radius: 20px; border-left: 5px solid var(--glowwe-pink);
    background: var(--glowwe-white); box-shadow: var(--shadow-sm); margin: 2rem 0;
}
.pro-tip-box { border-left-color: #3b82f6; background: #eff6ff; }

/* Mixology */
.mix-card { padding: 1.75rem; border-radius: 20px; margin-bottom: 1rem; }
.mix-good { border: 1px solid #a7f3d0; background: #f0fdf4; }
.mix-bad { border: 1px solid #fecaca; background: #fef2f2; }
.mix-header { font-weight: 800; font-size: 1.15rem; margin-bottom: 0.5rem; }

/* Tags */
.tag-pill {
    display: inline-block; background: var(--glowwe-white); border: 1px solid var(--glowwe-border);
    padding: 0.6rem 1.2rem; border-radius: 12px; font-weight: 600; text-decoration: none;
    color: var(--glowwe-text); margin: 0 0.5rem 0.5rem 0; transition: all 0.2s;
}
.tag-pill:hover { border-color: var(--glowwe-pink); color: var(--glowwe-pink); transform: translateY(-2px); }

/* Nerd Corner */
.nerd-corner {
    background: var(--glowwe-black); color: var(--glowwe-white);
    padding: 4rem 3rem; border-radius: 32px; margin-top: 6rem;
}
/* --- SECTION TITLE OVERRIDE FOR NERD CORNER --- */
.nerd-corner .section-title {
    color: var(--glowwe-white);
}

/* --- THE SCIENCE CONTENT (Legibility Fix) --- */
.proof-statement {
    font-size: 1.1rem;
    color: #94a3b8; /* Cool gray for readable contrast */
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.proof-statement strong {
    color: var(--glowwe-white); /* High contrast for emphasis */
}

.spec-val {
    color: var(--glowwe-white); /* Pure white for spec values */
    font-weight: 600;
    font-size: 1.15rem;
}

/* --- SKIN PILL UI (Perfect For upgrade) --- */
.tag-pill.skin-pill {
    background: var(--glowwe-pink-soft);
    color: var(--glowwe-pink);
    border: 1px solid rgba(241, 114, 154, 0.2);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
}

.tag-pill.skin-pill:hover {
    background: var(--glowwe-pink);
    color: white;
}

/* --- TOOLTIP TEXT RESET --- */
.info-icon .tooltip {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    text-transform: none !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
    line-height: 1.4;
}
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 2rem; }
.spec-item { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; }
.spec-label { display: block; font-size: 0.8rem; color: #94a3b8; text-transform: uppercase; margin-bottom: 0.25rem; }
.spec-val { font-size: 1.15rem; font-weight: 600; }

/* Explore More */
.explore-more { margin-top: 5rem; border-top: 2px solid var(--glowwe-border); padding-top: 4rem; }
.suggestion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.sugg-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem; border-radius: 16px; background: white; border: 1px solid var(--glowwe-border);
    text-decoration: none; transition: 0.2s;
}
.sugg-card:hover { transform: translateY(-3px); border-color: var(--glowwe-pink); }

/* =========================================================
   RESPONSIVE OVERRIDES
   ========================================================= */

@media (max-width: 768px) {
    .brand-logo { font-size: 2.8rem; }
    .hero-section { padding: 4rem 1.5rem; }
    .search-form { flex-direction: column; }
    .search-btn { padding: 1.25rem; border-radius: 16px; }
    .search-input { border-radius: 16px; }

    .ingredient-title { font-size: 2.8rem; }
    .highlight-card { padding: 1.5rem; flex-direction: column; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .nerd-corner { padding: 2.5rem 1.5rem; border-radius: 24px; }
}