/* Global Color Variables */
:root {
    --primary-color: #4f46e5;
    --primary-light: #6366f1;
    --secondary-color: #10b981;
    --secondary-light: #34d399;
    --accent-color: #f59e0b;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --background-light: #f8fafc;
    --background-alt: #f1f5f9;
    --white: #ffffff;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.logo img {
    max-height: 50px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:not(.active)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 9999px;
    min-width: 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* Mobile navigation toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 110;
}

.mobile-nav-toggle:focus {
    outline: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    padding: 0.75rem 1.75rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: rgba(255,255,255,0.15);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease-out forwards;
}

.notification-warning {
    background-color: var(--danger-color);
}

.notification i {
    margin-right: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 4rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.footer-brand img {
    max-height: 50px;
    max-width: 150px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 0.875rem;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    opacity: 1;
    color: var(--secondary-light);
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .mobile-nav-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: 1.25rem;
    }
    
    .navbar {
        padding: 1rem 0;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        margin: 0;
        padding: 6rem 2rem 2rem;
        flex-direction: column;
        gap: 2rem;
        z-index: 100;
        transition: right 0.3s ease;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 90;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    .footer {
        padding: 2.5rem 0;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
    }
    
    .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .nav-links {
        width: 85%;
    }
}

/* Touchscreen Optimizations */
@media (hover: none) {
    .nav-link:hover::after {
        transform: scaleX(0); /* Disable hover effects on touch devices */
    }
    
    .nav-link.active::after {
        transform: scaleX(1); /* Keep active state visible */
    }
    
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none; /* Remove hover animations on touch devices */
    }
    
    /* Add touch feedback */
    .btn:active,
    .nav-link:active,
    .footer-link:active {
        opacity: 0.7;
    }
}

/* Import Popup Styles */
@import './popup.css';