/* 
 * KorManav - Modern Grocery Template
 * Design System & Core Styles
 */

:root {
    /* Color Palette */
    --primary: #1a4d2e;
    /* Deep Forest Green - Trust/Nature */
    --primary-dark: #143d23;
    --accent: #4caf50;
    /* Fresh Lime/Apple Green - Vibrant/Fresh */
    --accent-hover: #43a047;
    --bg-body: #f9f9f7;
    /* Cream/Off-white - Premium Base */
    --bg-surface: #ffffff;
    --text-main: #2c3e50;
    /* Dark Charcoal - Readable/Soft Black */
    --text-muted: #64748b;
    --border-light: #e2e8f0;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #1a4d2e 0%, #2e7d32 100%);
    --grad-fresh: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
    --grad-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));

    /* Shadows - Soft & Modern */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-green: 0 10px 25px -5px rgba(26, 77, 46, 0.3);

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-pill: 9999px;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Reset & Typography */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 2rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.text-primary {
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.text-white {
    color: #fff !important;
}

.bg-accent {
    background-color: var(--accent) !important;
}

.bg-light {
    background-color: var(--bg-surface) !important;
}

.container-custom {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 5rem 0;
}

/* Buttons */
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-green);
    color: white;
}

.btn-accent {
    background: var(--grad-fresh);
    color: white;
}

.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
}

/* Navbar Styles */
.navbar-wrapper {
    z-index: 1000;
}

.navbar {
    transition: all 0.3s ease;
}

.logo i {
    transform: rotate(-15deg);
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    padding-top: 80px;
    /* Space for fixed navbar */
    overflow: hidden;
    position: relative;
}

.hero-animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-card-1 {
    animation: float 5s ease-in-out infinite reverse;
}

/* Trust Items */
.trust-item h3 {
    font-weight: 800;
}

/* Features Section */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto;
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--accent);
    color: white;
}

/* Bento Grid Categories */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 1.5rem;
}

.bento-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    display: block;
    /* anchor tag */
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.bento-item:hover img {
    transform: scale(1.1);
}

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 2;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.product-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    transition: bottom 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.product-card:hover .product-actions {
    bottom: 0;
}

.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-circle:hover {
    background: var(--primary);
    color: white;
}

/* Footer Styles */
.footer {
    background: var(--primary-dark) !important;
    color: rgba(255, 255, 255, 0.8);
}

.footer h4 {
    color: white;
}

.footer a {
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.footer a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 0.5rem;
    color: white;
    text-decoration: none;
    vertical-align: middle;
}

.social-link i {
    line-height: 0;
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-3px);
    color: white;
}

/* Responsive Grid & Layout Updates */
@media (max-width: 991px) {
    h1.display-1 {
        font-size: 2.2rem !important;
        /* Smaller text for mobile */
    }

    h1.display-3 {
        font-size: 2rem !important;
    }

    .hero-section {
        padding-top: 100px;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .trust-indicators {
        justify-content: center;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        /* Force single column on mobile */
        grid-template-rows: auto;
    }

    .container-custom {
        padding-left: 20px;
        padding-right: 20px;
        width: 100%;
    }

    .bento-large,
    .bento-wide {
        grid-column: span 1 !important;
        /* Force full width */
        height: 250px;
    }

    .bento-item {
        height: 200px;
    }

    /* Mobile Menu Styles */
    .nav-links.mobile-active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 110%;
        /* Slight offset */
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        padding: 2rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        animation: slideDown 0.3s ease;
        z-index: 9999;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Mobile Bottom Nav Fix */
@media (max-width: 991px) {
    body {
        padding-bottom: 80px;
    }

    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        /* Distribute items evenly */
        align-items: center;
        /* Center vertically */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        /* Fixed height for consistency */
        background: white;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
        /* Stronger shadow */
        padding: 0;
        /* Removing padding to let flexbox handle consistent spacing */
        z-index: 9999;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-bottom-nav .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #94a3b8;
        /* Muted text */
        font-size: 0.7rem;
        font-family: var(--font-body);
        gap: 5px;
        transition: all 0.3s ease;
        flex: 1;
        /* Make items take equal width */
        height: 100%;
    }

    .mobile-bottom-nav .mobile-nav-item i {
        font-size: 1.4rem;
        margin-bottom: 0;
        transition: all 0.3s ease;
    }

    .mobile-bottom-nav .mobile-nav-item.active {
        color: var(--primary);
        /* Active color */
        font-weight: 600;
    }

    .mobile-bottom-nav .mobile-nav-item.active i {
        color: var(--accent);
        /* Active icon color */
        transform: translateY(-2px);
    }

    .mobile-bottom-nav .badge {
        position: absolute;
        top: 5px !important;
        left: 50% !important;
        transform: translateX(2px) !important;
        /* Position relative to icon center */
        padding: 0.25em 0.4em !important;
        font-size: 0.6rem !important;
        border: 2px solid white;
        /* create separation from icon */
        min-width: 1rem;
        text-align: center;
    }
}