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

/* CSS Variables for consistent theming */
:root {
    --primary-gradient: linear-gradient(135deg, #8b5cf6, #3b82f6);
    --secondary-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);
    --accent-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
    --success-gradient: linear-gradient(135deg, #10b981, #059669);
    --warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --danger-gradient: linear-gradient(135deg, #ef4444, #dc2626);
    
    --deal-red: linear-gradient(135deg, #fecaca, #fca5a5);
    --deal-orange: linear-gradient(135deg, #fed7aa, #fdba74);
    --deal-yellow: linear-gradient(135deg, #fef3c7, #fde68a);
    --deal-green: linear-gradient(135deg, #d1fae5, #a7f3d0);
    --deal-blue: linear-gradient(135deg, #dbeafe, #bfdbfe);
    --deal-purple: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #374151;
    background: linear-gradient(135deg, #f3e8ff 0%, #e0f2fe 50%, #ecfdf5 100%);
    min-height: 100vh;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    background: var(--primary-gradient) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.input-group-text {
    border: none;
    background: white;
}

.form-control {
    border: none;
    box-shadow: none;
}

.form-control:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-section .container {
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-btn {
    background: var(--accent-gradient);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Hero decorative elements */
.hero-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(40px);
    animation: float 6s ease-in-out infinite;
}

.hero-decoration-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.hero-decoration-2 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    right: 10%;
    animation-delay: -3s;
}

/* Section Titles */
.section-title {
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

/* Deal Cards */
.deal-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem 1rem;
    text-align: center;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.deal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    transition: var(--transition);
}

.deal-red::before { background: var(--deal-red); }
.deal-orange::before { background: var(--deal-orange); }
.deal-yellow::before { background: var(--deal-yellow); }
.deal-green::before { background: var(--deal-green); }
.deal-blue::before { background: var(--deal-blue); }
.deal-purple::before { background: var(--deal-purple); }

.deal-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.deal-card:hover::before {
    opacity: 0.2;
}

.deal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
}

.deal-red .deal-icon { color: #dc2626; }
.deal-orange .deal-icon { color: #ea580c; }
.deal-yellow .deal-icon { color: #ca8a04; }
.deal-green .deal-icon { color: #059669; }
.deal-blue .deal-icon { color: #2563eb; }
.deal-purple .deal-icon { color: #7c3aed; }

.deal-percent {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.deal-red .deal-percent { color: #dc2626; }
.deal-orange .deal-percent { color: #ea580c; }
.deal-yellow .deal-percent { color: #ca8a04; }
.deal-green .deal-percent { color: #059669; }
.deal-blue .deal-percent { color: #2563eb; }
.deal-purple .deal-percent { color: #7c3aed; }

.deal-text {
    color: #6b7280;
    margin: 0;
    opacity: 0.75;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ef4444;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.product-category {
    background: var(--primary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
}

.product-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-rating {
    color: #fbbf24;
}

.btn-add-cart {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-add-cart:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* List View Styles */
.list-view .product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.list-view .product-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.list-view .product-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Button Styles */
.btn-outline-primary {
    border-color: #8b5cf6;
    color: #8b5cf6;
    transition: var(--transition);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    transition: var(--transition);
}

.btn-outline-secondary:hover,
.btn-outline-secondary.active {
    transform: translateY(-1px);
}

/* Cart Styles */
.cart-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.cart-item:hover {
    background: #f3f4f6;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

/* Footer */
.footer-section {
    background: var(--primary-gradient);
    color: white;
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .deal-card {
        padding: 1.5rem 0.5rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .list-view .product-card {
        flex-direction: column;
    }
    
    .list-view .product-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Enhanced focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

/* Print styles */
@media print {
    .navbar,
    .hero-section,
    .footer-section,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .product-card {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

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

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