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

:root {
    --primary-color: #4f46e5; /* Indigo */
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --accent-color: #ec4899; /* Pink Accent */
    --accent-hover: #db2777;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-radius: 16px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(46, 125, 50, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.nav-links .btn-primary, .btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-links .btn-primary:hover, .btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 160, 71, 0.3);
    color: white;
}

.nav-links .btn-accent, .btn-accent {
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-links .btn-accent:hover, .btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
    color: white;
}

.logout-form {
    display: inline;
}
.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}
.logout-btn:hover {
    color: #e53935;
}

/* Layout */
main {
    flex: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(55,48,163,0.9), rgba(79,70,229,0.8)), url('https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?w=1600') center/cover;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    border-radius: 0 0 40px 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 50px;
    padding: 20px;
}
.hero h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero p {
    font-size: 22px;
    font-weight: 300;
    max-width: 600px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Products Grid */
.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--primary-dark);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    background: var(--accent-color);
    bottom: -10px;
    left: 25%;
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}
.product-card:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-name {
    font-size: 22px;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 700;
    flex: 1;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Forms & Auth Boxes */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255,255,255,0.5);
}

.glass-panel h1 {
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
}
.glass-panel p.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    outline: none;
    background: #f8fafc;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.1);
}

/* Form rendering for Django's as_p */
form p {
    margin-bottom: 20px;
}
form p label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}
form p input, form p select, form p textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    outline: none;
    background: #f8fafc;
}
form p input:focus, form p select:focus, form p textarea:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.1);
}

.auth-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}

.auth-links a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.auth-links a:hover {
    text-decoration: underline;
}

/* Messages / Alerts */
.messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.alert {
    padding: 15px 25px;
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.5s ease-out forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    border-left: 5px solid;
}
.alert-success {
    border-left-color: var(--primary-light);
    color: var(--primary-dark);
}
.alert-error, .alert-danger {
    border-left-color: #e53935;
    color: #c62828;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: auto;
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.w-100 { width: 100%; }
