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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    letter-spacing: -0.01em;
}

/* Navbar styles*/
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo ion-icon {
    font-size: 1.8rem;
}

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

.nav-links button {
    color: white;
    background-color: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    border: none;
    gap: 0.5rem;
    font-size: 1.05rem;
}

.nav-links button:disabled{
    cursor: not-allowed;
}

.nav-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.nav-links button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffd700;
    transition: width 0.3s ease;
}

.nav-links button:hover {
    color: #ffd700;
    transform: translateY(-2px);
    cursor: pointer;
}

.nav-links button:disabled:hover{
    cursor: not-allowed;
}

.nav-links button:hover::after {
    width: 100%;
}

.nav-links button:active {
    transform: translateY(0);
}

/* Search Bar styles */
.search-bar {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #999;
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: #667eea;
}

.search-bar input {
    padding: 0.6rem 1rem 0.6rem 2.6rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    width: 500px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
    background-color: white;
}

.search-bar button {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.search-bar button ion-icon {
    font-size: 1.1rem;
}

.search-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}
.cart-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 50%;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.3rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.5);
    animation: pulse 2s infinite;
}

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

/* Main Content */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.sidebar h3 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h4 {
    color: #34495e;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.filter-option input[type="checkbox"],
.sort-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.filter-option label,
.sort-option label {
    cursor: pointer;
    color: #555;
    font-size: 0.9rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    padding: 0.6rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.sort-option:hover {
    background-color: #f8f9fa;
}

.sort-option label ion-icon {
    font-size: 1.1rem;
    color: #667eea;
}

.price-inputs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.price-inputs input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.clear-filters {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clear-filters ion-icon {
    font-size: 1.2rem;
}

.clear-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* Lessons Grid */
.lessons-container {
    flex: 1;
}

.lessons-header {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.lessons-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.results-count {
    color: #7f8c8d;
    font-size: 0.95rem;
    font-weight: 400;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.lesson-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.lesson-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.32),
        0 0 0 1px rgba(102, 126, 234, 0.3),
        0 12px 40px -8px rgba(102, 126, 234, 0.5);
}

.lesson-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.lesson-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
    transition: opacity 0.3s ease;
}

.lesson-card:hover .lesson-image::before {
    opacity: 0.5;
}

.lesson-content {
    padding: 1.5rem;
}

.lesson-title {
    color: #2c3e50;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    letter-spacing: -0.01em;
}

.lesson-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    font-size: 0.9rem;
}

.detail-icon {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.lesson-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stars {
    color: #f39c12;
}

.rating-count {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.lesson-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.lesson-price {
    color: #10b981;
    font-size: 1.5rem;
    font-weight: bold;
}

.add-to-cart-btn {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.add-to-cart-btn:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.add-to-cart-btn:disabled:hover {
    transform: none;
}

.spaces-available {
    color: #f5576c;
    font-size: 0.85rem;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .sidebar.collapsed {
        width: 0;
        padding: 0;
    }

    .nav-links {
        display: none;
    }

    .search-bar input {
        width: 200px;
    }
}

.error-message{
    color: red;
    font-size: 14px;
    margin-top: 10px;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.animation-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    max-height: 650px;
    width: 60%;
    position: relative;
    overflow: hidden;
    transform: scale(0.7);
    transition: transform 0.4s ease;
}

.popup-overlay.active .animation-container {
    transform: scale(1);
}

.checkoutAnimation, .checkoutLoading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.checkoutAnimation {
    opacity: 0;
}

.checkoutLoading {
    opacity: 0;
}

.checkoutAnimation.active, .checkoutLoading.active {
    opacity: 1;
}

.success-message {
    margin-top: 20px;
    font-size: 1.35rem;
    color: #27ae60;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s;
}

.success-message.active {
    opacity: 1;
    transform: translateY(0);
}

.progress-bar {
    height: 4px;
    background: #ecf0f1;
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.1s linear;
}
.checkoutLoading p{
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
}