/* ==========================================================================
   HEALTHY SANDWICH 3D - MODERN DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
    --bg-dark: #0f1319;
    --bg-card: rgba(22, 28, 38, 0.65);
    --bg-card-hover: rgba(32, 42, 58, 0.85);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(245, 158, 11, 0.4);
    
    --primary: #f59e0b;
    --primary-glow: rgba(245, 158, 11, 0.35);
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #fbbf24;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-highlight: #fef08a;

    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-main);
    user-select: none;
}

/* Background overlay with glowing radial light behind sandwich */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.12) 0%, rgba(16, 185, 129, 0.05) 35%, rgba(15, 19, 25, 0) 70%),
        radial-gradient(circle at 10% 20%, rgba(239, 68, 68, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
}

/* 3D Canvas */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* HTML 3D Callout Pins Container */
#pins-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
}

.layer-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    cursor: pointer;
}

.layer-pin.visible {
    opacity: 1;
}

.layer-pin .pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 12px var(--primary);
    animation: pinPulse 2s infinite ease-in-out;
}

@keyframes pinPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px var(--primary); }
    50% { transform: scale(1.25); box-shadow: 0 0 20px var(--primary); }
}

.layer-pin .pin-label {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-accent);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}

.layer-pin:hover .pin-label {
    background: var(--primary);
    color: #0f1319;
    transform: scale(1.05);
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 24px;
    right: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(15, 19, 25, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    border-radius: 50% !important;
    border: 2px solid var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f1319;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.brand-logo-img {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.brand-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #d97706);
    color: #0f1319;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--primary);
}

/* Hero Header Text */
.hero-header {
    position: fixed;
    top: 100px;
    left: 48px;
    z-index: 5;
    max-width: 480px;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.subtitle-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--border-accent);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 56px;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.highlight-text {
    background: linear-gradient(135deg, #fef08a, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Side Layer Navigation Inspector Bar */
.layer-nav-container {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    padding: 16px 12px;
    border-radius: var(--radius-lg);
}

.layer-nav-header {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 6px;
}

.layer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.layer-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.layer-item.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--border-accent);
}

.layer-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.layer-item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.layer-item.active .layer-item-name {
    color: #fff;
    font-weight: 700;
}

/* Active Layer Detail Card */
.layer-card {
    position: fixed;
    left: 48px;
    bottom: 110px;
    width: 320px;
    padding: 24px;
    z-index: 5;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.layer-card.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.card-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 4px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e1;
    margin-bottom: 0;
}

.nutrition-grid {
    display: none; /* Hidden per user request; kept intact in HTML & JS */
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nutri-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nutri-val {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-highlight);
}

.nutri-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Bottom Bar & Controls */
.bottom-bar {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    pointer-events: auto;
}

.mouse-icon {
    width: 20px;
    height: 30px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.mouse-icon .wheel {
    width: 4px;
    height: 6px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite ease-in-out;
}

@keyframes scrollWheel {
    0% { top: 5px; opacity: 1; }
    100% { top: 16px; opacity: 0; }
}

.scroll-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.social-links-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    pointer-events: auto;
}

.slider-control-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    pointer-events: auto;
}

.slider-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 140px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.percent-label {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    min-width: 40px;
    text-align: right;
}

/* Scroll Spacer to enable page scroll height */
.scroll-spacer {
    height: 500vh;
    width: 100%;
}

/* Desktop Social Group (Visible on > 768px in Navbar) */
.desktop-social-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile Social Widget Container (Default hidden on desktop) */
.mobile-social-widget {
    display: none;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .desktop-social-group {
        display: none;
    }

    .mobile-social-widget {
        display: flex;
        position: fixed;
        bottom: 24px;
        right: 16px;
        z-index: 99;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .social-toggle-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary), #d97706);
        color: #0f1319;
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
        border: 2px solid #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease;
    }

    .social-toggle-btn.active {
        transform: rotate(90deg);
        background: rgba(15, 23, 42, 0.9);
        color: #fff;
        border-color: var(--border-accent);
    }

    .mobile-social-menu {
        display: flex;
        flex-direction: column;
        gap: 10px;
        opacity: 0;
        transform: translateY(15px) scale(0.85);
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .mobile-social-menu.open {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .mobile-social-menu .icon-btn {
        width: 44px;
        height: 44px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
        text-decoration: none;
    }

    .mobile-social-menu .social-wa {
        background: #25d366;
        color: #fff;
        border: none;
    }
    .mobile-social-menu .social-ig {
        background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
        color: #fff;
        border: none;
    }
    .mobile-social-menu .social-tt {
        background: #000;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.25);
    }

    .navbar {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 8px 12px;
        gap: 8px;
    }

    .brand {
        gap: 8px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .brand-name {
        font-size: 14px;
    }

    .brand-tag {
        display: none;
    }

    .nav-controls {
        gap: 6px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    #btn-reset {
        display: none; /* Hide redundant reset view button on mobile header */
    }

    .hero-header {
        top: 64px;
        left: 16px;
        right: 16px;
        max-width: 100%;
        text-align: center;
    }

    .subtitle-badge {
        font-size: 9px;
        padding: 3px 10px;
        margin-bottom: 4px;
    }

    .main-title {
        font-size: 28px;
        margin-bottom: 4px;
    }

    .hero-desc {
        display: none; /* Hide long description on mobile so 3D model stays visible */
    }

    .layer-nav-container {
        display: none;
    }

    .layer-pin .pin-dot {
        width: 10px;
        height: 10px;
    }

    .layer-pin .pin-label {
        font-size: 10px;
        padding: 4px 8px;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    }

    .layer-card {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 54px;
        padding: 14px 16px;
        border-radius: var(--radius-md);
    }

    .card-badge {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .card-title {
        font-size: 17px;
        margin-bottom: 1px;
    }

    .card-subtitle {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .card-desc {
        font-size: 11px;
        line-height: 1.4;
    }

    .bottom-bar {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }

    .scroll-indicator {
        display: none; /* Hide mouse scroll indicator on mobile screens */
    }

    .slider-control-box {
        width: 100%;
        justify-content: center;
        padding: 6px 14px;
        gap: 8px;
        background: rgba(15, 23, 42, 0.85);
    }

    .slider-label {
        font-size: 11px;
    }

    input[type="range"] {
        width: 110px;
    }

    .percent-label {
        font-size: 12px;
        min-width: 32px;
    }
}
