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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
    --radius-sm: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
}

/* Modern Navbar */
.navbar {
    background: var(--dark-gradient) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Hero Section */
.bg-primary {
    background: var(--primary-gradient) !important;
    position: relative;
    overflow: hidden;
}

.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Modern Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    overflow: hidden;
}

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

.category-card {
    background: white;
    border: none;
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.product-image {
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-price {
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.original-price {
    text-decoration: line-through;
    color: #a0aec0;
    font-size: 1rem;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-outline-primary, .btn-outline-danger, .btn-outline-success {
    border: 2px solid;
    background: transparent;
}

.btn-outline-primary {
    color: #667eea;
    border-color: #667eea;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

/* Form Controls */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Cart Styles */
.cart-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: none;
}

.cart-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.quantity-badge {
    background: #edf2f7;
    color: #2d3748;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    min-width: 45px;
    text-align: center;
}

/* Toast Notification */
.toast {
    background: white;
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.toast-header {
    background: var(--secondary-gradient);
    color: white;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
    padding: 3rem 0;
    margin-top: auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cart-animate {
    animation: cartBounce 0.3s ease;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
}

.badge.bg-danger {
    background: var(--secondary-gradient) !important;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 3rem 0;
}

/* Search Input */
.search-container {
    position: relative;
}

.search-container .form-control {
    padding-left: 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
}

.search-container .bi-search {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.25rem;
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    z-index: 10;
}

/* Loading State */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .product-image {
        height: 220px;
    }
    
    .category-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gradient);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 5rem;
    color: #cbd5e0;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #a0aec0;
}

/* Card Title */
.card-title {
    font-weight: 700;
    color: #2d3748;
    line-height: 1.4;
}

/* Price Container */
.price-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

/* Login/Signup Pages */
.auth-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: none;
    overflow: hidden;
}

.auth-card .card-body {
    padding: 3rem;
}

.auth-card h2 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--primary-gradient);
    color: white;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem;
}
