:root {
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 1rem;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.main-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
    position: relative;
    display: inline-block;
}

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

.unread-badge {
    position: absolute;
    top: -5px;
    right: -12px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    line-height: 1;
    z-index: 5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Django Messages Styles */
.messages-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 1rem 0 2rem !important;
    width: 100%;
}

.msg {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease-out;
    border: 1px solid transparent;
}

.msg::before {
    font-size: 1.2rem;
}

/* Success */
.msg.success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.msg.success::before {
    content: '✅';
}

/* Error / Danger */
.msg.error,
.msg.danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.msg.error::before,
.msg.danger::before {
    content: '❌';
}

/* Warning */
.msg.warning {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fef08a;
}

.msg.warning::before {
    content: '⚠️';
}

/* Info */
.msg.info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.msg.info::before {
    content: 'ℹ️';
}

.msg-warning {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.msg-warning::before {
    content: '⚠️';
}

.msg-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.msg-info::before {
    content: 'ℹ️';
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    background: var(--light);
    transition: background 0.2s;
}

.profile-btn:hover {
    background: #e2e8f0;
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -1px;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    /* Global entry animation for all pages */
    animation: fadeIn 0.6s ease-out both;
}

.container {
    width: 100%;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    font-size: 0.875rem;
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Card styles */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card-img {
    width: 100%;
    height: 200px;
    background: #e2e8f0;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Detail page styles */
.product-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.product-gallery img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}

.section-title {
    font-size: 1.5rem;
    margin: 2.5rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-item {
    background: white;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.hero-btn {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
    min-width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.secondary-btn {
    background: #e2e8f0;
    color: var(--dark);
}

.accent-btn {
    background: var(--accent);
    color: white;
}

.accent-btn:hover {
    opacity: 0.9;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-text {
    color: var(--gray);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .product-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block !important;
        cursor: pointer;
        background: none;
        border: none;
        color: var(--dark);
        padding: 0.5rem;
        margin-right: -0.5rem;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-top: 1.5rem;
    }

    .main-header {
        padding: 0.75rem 1rem;
    }

    .nav-links a {
        font-size: 1.125rem;
        padding: 1.1rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        color: var(--dark);
        position: relative;
    }

    .nav-links a .unread-badge {
        position: static;
        margin-left: auto;
        box-shadow: none;
        transform: none;
    }

    .logo {
        font-size: 1.25rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin: 2rem 0 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        gap: 1rem;
    }

    .hero-btn {
        width: 100%;
        min-width: 0;
        /* Override the desktop min-width */
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-section {
        padding: 2rem 1rem !important;
    }
}

.hamburger {
    display: none;
}

.mobile-only {
    display: none !important;
}