﻿:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #f59e0b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 120px;
    scroll-behavior: smooth;
}

header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 12px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-auth {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-logout {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 35px;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

    .modal-content input {
        width: 100%;
        padding: 14px 18px;
        margin: 8px 0;
        border: 1.5px solid #e2e8f0;
        border-radius: 12px;
        outline: none;
    }

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 15px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    color: #94a3b8;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.hero {
    text-align: center;
    padding: 30px 0 10px;
}

    .hero h1 {
        font-size: 28px;
        font-weight: 800;
        margin-bottom: 15px;
    }

.search-box {
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
}

    .search-box input {
        width: 100%;
        padding: 16px 25px 16px 55px;
        border-radius: 16px;
        border: none;
        box-shadow: var(--shadow);
        font-size: 16px;
        outline: none;
    }

    .search-box i {
        position: absolute;
        left: 22px;
        top: 18px;
        color: var(--primary);
    }

.category-title {
    margin: 40px 0 20px;
    font-size: 16px;
    font-weight: 800;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

    .category-title::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #e2e8f0;
    }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow);
        border-color: var(--primary);
    }

.product-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
}

    .product-info h3 {
        font-size: 14px;
        margin: 0 0 8px;
        font-weight: 700;
        color: var(--text);
        height: 40px;
        overflow: hidden;
    }

.price {
    color: var(--primary);
    font-weight: 800;
    font-size: 16px;
}

.qty-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px 15px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 10px;
}

.btn-qty {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: none;
    background: white;
    cursor: pointer;
    font-weight: 800;
    color: var(--primary);
}

.count {
    font-weight: 800;
    min-width: 20px;
    text-align: center;
}

.cart-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: #1e293b;
    color: white;
    padding: 15px 25px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.btn-pay {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-img {
        height: 120px;
    }
}
