﻿/* =========================================
           MODERN DESIGN SYSTEM & CSS VARIABLES
           ========================================= */
:root {
    /* Color Palette - Slate & Indigo */
    --pb-bg: #F8FAFC;
    --pb-surface: #FFFFFF;
    --pb-surface-hover: #F1F5F9;
    --pb-primary: #6366F1; /* Indigo 500 */
    --pb-primary-hover: #4F46E5; /* Indigo 600 */
    --pb-secondary: #8B5CF6; /* Violet 500 */
    --pb-text: #0F172A; /* Slate 900 */
    --pb-text-muted: #64748B; /* Slate 500 */
    --pb-border: #E2E8F0; /* Slate 200 */
    --pb-success: #10B981;
    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    /* Spacing & Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    /* Shadows */
    --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-glow: 0 0 40px -10px var(--pb-primary);
}

[data-bs-theme="dark"] {
    --pb-bg: #020617; /* Slate 950 */
    --pb-surface: #0F172A; /* Slate 900 */
    --pb-surface-hover: #1E293B; /* Slate 800 */
    --pb-primary: #818CF8; /* Indigo 400 */
    --pb-primary-hover: #6366F1; /* Indigo 500 */
    --pb-secondary: #A78BFA; /* Violet 400 */
    --pb-text: #F8FAFC; /* Slate 50 */
    --pb-text-muted: #94A3B8; /* Slate 400 */
    --pb-border: #1E293B; /* Slate 800 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* =========================================
           BASE STYLES
           ========================================= */
body {
    font-family: var(--font-body);
    background-color: var(--pb-bg);
    color: var(--pb-text);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pb-text);
}

p, .lead {
    color: var(--pb-text-muted);
    line-height: 1.7;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* =========================================
           COMPONENTS
           ========================================= */
/* Buttons */
.btn {
    font-family: var(--font-display);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
    border: none;
    color: white;
    box-shadow: 0 4px 15px -3px rgba(99, 102, 241, 0.4);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px -3px rgba(99, 102, 241, 0.6);
        color: white;
    }

.btn-outline-primary {
    border: 1.5px solid var(--pb-border);
    color: var(--pb-text);
    background: transparent;
}

    .btn-outline-primary:hover {
        background: var(--pb-surface-hover);
        border-color: var(--pb-primary);
        color: var(--pb-primary);
    }

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--pb-text-muted);
}

    .btn-ghost:hover {
        color: var(--pb-primary);
        background: var(--pb-surface-hover);
    }

/* Cards */
.card {
    background-color: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    .card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(99, 102, 241, 0.2);
    }

.card-img-top {
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Badges */
.badge {
    font-family: var(--font-display);
    font-weight: 600;
    padding: 0.5em 0.8em;
    border-radius: var(--radius-sm);
}

/* Forms */
.form-control, .form-select {
    background-color: var(--pb-surface);
    border: 1.5px solid var(--pb-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--pb-text);
    transition: all 0.2s ease;
}

    .form-control:focus, .form-select:focus {
        background-color: var(--pb-surface);
        border-color: var(--pb-primary);
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        color: var(--pb-text);
    }

.form-floating > label {
    color: var(--pb-text-muted);
}

/* =========================================
           NAVBAR
           ========================================= */
.navbar {
    background-color: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--pb-border);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .navbar {
    background-color: rgba(2, 6, 23, 0.8);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--pb-text) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .navbar-brand .brand-icon {
        width: 32px;
        height: 32px;
        background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1rem;
    }

.nav-link {
    font-weight: 500;
    color: var(--pb-text-muted) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
}

    .nav-link:hover, .nav-link.active {
        color: var(--pb-primary) !important;
        background-color: var(--pb-surface-hover);
    }

.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    font-size: 0.65rem;
    background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
    border: 2px solid var(--pb-bg);
}

/* =========================================
           HERO SECTION
           ========================================= */
.hero-section {
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.hero-bg-gradient-2 {
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.6s ease;
}

    .hero-image-wrapper:hover {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    }

    .hero-image-wrapper img {
        width: 100%;
        height: auto;
        display: block;
    }

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pb-border);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--pb-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--pb-text-muted);
    margin-top: 0.5rem;
}

/* =========================================
           BENTO GRID (Categories)
           ========================================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 1.5rem;
}

.bento-item {
    background-color: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .bento-item:hover {
        transform: translateY(-5px);
        border-color: var(--pb-primary);
        box-shadow: var(--shadow-lg);
    }

    .bento-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .bento-item.wide {
        grid-column: span 2;
    }

.bento-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--pb-primary);
    margin-bottom: 1rem;
}

.bento-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bento-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bento-item.large, .bento-item.wide {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 200px;
    }
}

@media (max-width: 576px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item.large, .bento-item.wide {
        grid-column: span 1;
    }
}

/* =========================================
           HOW IT WORKS
           ========================================= */
.step-card {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* =========================================
           PRODUCT CARDS
           ========================================= */
.product-card .card-body {
    padding: 1.5rem;
}

.product-price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pb-text);
}

.product-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--pb-primary);
    border: none;
}

[data-bs-theme="dark"] .product-tag {
    background: rgba(15, 23, 42, 0.9);
}

/* =========================================
           TESTIMONIALS
           ========================================= */
.testimonial-card {
    background-color: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    height: 100%;
}

.testimonial-quote {
    font-size: 3rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* =========================================
           FOOTER
           ========================================= */
footer {
    background-color: var(--pb-surface);
    border-top: 1px solid var(--pb-border);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-link {
    color: var(--pb-text-muted);
    display: block;
    margin-bottom: 0.75rem;
}

    .footer-link:hover {
        color: var(--pb-primary);
        transform: translateX(5px);
    }

.social-icon {
    width: 40px;
    height: 40px;
    background-color: var(--pb-surface-hover);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pb-text-muted);
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

    .social-icon:hover {
        background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
        color: white;
        transform: translateY(-3px);
    }

/* =========================================
           ANIMATIONS
           ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

    .fade-in-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

/* Page Sections */
.page-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

    .page-section.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--pb-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--pb-border);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--pb-text-muted);
    }
