/* Core Variables & Reset */
:root {
    --primary: #FF5A5F;
    --primary-hover: #fa4248;
    --accent: #FFD166;
    --bg-light: #ffffff;
    --text-light: #111827;
    --card-light: #f3f4f6;
    --border-light: #e5e7eb;

    /* Dark Theme (Default) */
    --bg-dark: #0f172a;
    --text-dark: #f8fafc;
    --card-dark: #1e293b;
    --border-dark: #334155;

    /* Dynamic Active Theme Variables */
    --bg: var(--bg-dark);
    --text: var(--text-dark);
    --card: var(--card-dark);
    --border: var(--border-dark);

    --font-sans: 'Outfit', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-neon: 0 0 20px rgba(255, 90, 95, 0.4);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg: var(--bg-light);
    --text: var(--text-light);
    --card: var(--card-light);
    --border: var(--border-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    font-family: inherit;
}

button,
input,
select,
textarea {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Premium Typography */
.jc-big-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    background-color: var(--primary);
    color: white !important;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 90, 95, 0.3);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 90, 95, 0.5);
}

.btn-secondary {
    background-color: var(--card);
    color: var(--text) !important;
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white !important;
    border-color: var(--primary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: #ffffff;
    /* Solid white background */
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.nav-link,
.icon-btn {
    color: var(--text-light) !important;
    opacity: 0.8;
}

.nav-link:hover,
.icon-btn:hover {
    opacity: 1;
    color: var(--primary) !important;
}

.nav-brand .logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-brand .accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    opacity: 0.7;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-btn {
    color: var(--text);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--card);
}

.cart-btn .badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Layout */
#app-root {
    margin-top: 70px;
    flex: 1;
    min-height: calc(100vh - 70px - 80px);
    /* viewport - nav - footer */
    position: relative;
}

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50vh;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    padding: 2rem;
    background: var(--card);
    border-top: 1px solid var(--border);
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-links a {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
.menu-toggle {
    display: none;
}

@media (max-width: 992px) {
    .navbar {
        padding: 0 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 4rem 2rem;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 2rem;
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        font-weight: 800;
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 16px;
    }

    .nav-link:hover {
        background: rgba(255, 90, 95, 0.05);
    }

    .nav-link.active::after {
        display: none;
    }

    .footer-brand img {
        height: 50px !important;
    }
}

@media (max-width: 768px) {
    .jc-big-title {
        font-size: 2.5rem;
    }

    .btn {
        width: 100%;
        padding: 1rem 1.5rem;
    }

    .container,
    .jc-wrapper {
        padding: 0 1.5rem !important;
    }
}

@media (max-width: 640px) {
    .navbar {
        height: 65px;
    }

    #app-root {
        margin-top: 65px;
    }

    .nav-links {
        top: 65px;
        height: calc(100vh - 65px);
    }

    .nav-actions {
        gap: 0.3rem;
    }

    .icon-btn {
        width: 34px;
        height: 34px;
    }

    .nav-brand img {
        height: 35px !important;
    }
}