/* ==========================================================================
   Premium UI Styling - Digital Business Page Builder
   ========================================================================== */

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

:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #10b981;
    --dark: #0f172a;
    --dark-secondary: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --danger: #ef4444;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

    /* Shadows & Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    transition: padding var(--transition-normal);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -1px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.5);
    color: var(--white);
}

.btn-light {
    background: var(--white);
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}

.btn-light:hover {
    background: #f1f5f9;
    color: var(--dark);
    transform: translateY(-1px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Forms & Cards
   ========================================================================== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background-color: #fef2f2;
}

.invalid-feedback {
    display: block;
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ==========================================================================
   Auth Pages Layout
   ========================================================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 24px 2rem;
    background: radial-gradient(circle at top right, #e0e7ff, transparent 40%),
                radial-gradient(circle at bottom left, #fce7f3, transparent 40%);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    animation: fadeInUp 0.5s ease backwards;
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-card p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ==========================================================================
   Home Landing Page
   ========================================================================== */
   
.hero {
    padding: 10rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(79,70,229,0.05) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: var(--gradient-dark);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideUp 0.6s ease backwards;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: slideUp 0.6s ease backwards 0.1s;
}

.hero .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    animation: zoomIn 0.6s ease backwards 0.2s;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--white);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.feature-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--light);
    transition: transform var(--transition-normal);
    border: 1px solid rgba(0,0,0,0.03);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    background: var(--white);
    border-color: rgba(79,70,229,0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   Dashboard Outline (Future scaling)
   ========================================================================== */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid #e2e8f0;
    padding: 2rem 1.5rem;
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    text-align: center;
    padding: 3rem 0;
    background: var(--white);
    color: var(--text-muted);
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.1rem; }
    .navbar {
        padding: 0.85rem 0;
    }
    .nav-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.85rem;
    }
    .logo {
        flex: 1 1 100%;
        text-align: center;
        font-size: 1.15rem;
        line-height: 1.2;
        letter-spacing: -0.04em;
        white-space: normal;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.65rem;
    }
    .nav-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0.6rem 0.9rem;
        border-radius: var(--radius-full);
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid #dbe4ee;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
        font-size: 0.9rem;
        text-align: center;
    }
    .nav-links a.btn {
        padding: 0.7rem 1rem;
    }
    .dashboard-wrapper {
        display: block;
        padding-top: 128px;
    }
    .sidebar {
        display: block;
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1.25rem 1rem;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 420px) {
    .container {
        padding: 0 16px;
    }
    .logo {
        font-size: 1.05rem;
    }
    .nav-links {
        gap: 0.5rem;
    }
    .nav-links a {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 132px;
        padding: 0.6rem 0.75rem;
        font-size: 0.86rem;
    }
    .dashboard-wrapper {
        padding-top: 146px;
    }
}

/* ==========================================================================
   Admin & Dashboard Custom Adjustments
   ========================================================================== */

/* Item Grids for Products/Gallery */
.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.item-card {
    text-align: center;
    overflow: hidden;
    padding: 1.5rem;
}

.item-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

/* Admin Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
}

.table th, .table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--dark-secondary);
}

.badge {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.badge-premium { background: #fef08a; color: #854d0e; }
.badge-free { background: #e2e8f0; color: #475569; }
