/* --- Reset & Variables --- */
:root {
    --primary-color: #006666;
    --accent-color: #e67e22;
    --text-color: #2d3748;
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.08);
    --radius: 10px;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.7;
    background-color: #ffffff;
    overflow-x: hidden;
    /* Prevent horizontal scroll on mobile */
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Ensure Bootstrap doesn't override link colors */
a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 500;
    text-transform: capitalize;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--text-color);
}

.btn-white:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* --- Top Bar --- */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Header --- */
.main-header {
    padding: 10px 0;
    /* Reduced top/bottom padding to keep overall height similar */
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 100px;
    /* Use min-height instead of fixed height */
    height: auto;
}

.logo {
    display: block;
    flex-shrink: 0;
    height: 100%;
    /* Fill the header height */
    display: flex;
    align-items: center;
}

.logo img {
    height: 90px;
    /* Big and clear */
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

/* Search Bar (Centered in Main Header) */
.search-bar {
    flex-grow: 1;
    max-width: 600px;
    /* Limit width */
    margin: 0 20px;
}

/* --- Bottom Nav (New Row) --- */
.bottom-nav {
    background: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    /* Tighter gap */
    margin: 0 auto;
    /* Center in container */
    padding: 0;
    justify-content: center;
    /* Ensure items are packed in center */
    width: fit-content;
    /* Don't stretch to full width */
}

.nav-links li {
    margin: 0;
    /* Remove any margins */
    padding: 0;
}

.mobile-nav-close {
    display: none;
}

.nav-links li a {
    display: block;
    padding: 8px 12px;
    /* Consistent padding */
    font-weight: 500;
    text-transform: capitalize;
    font-size: 0.95rem;
    position: relative;
    color: var(--white);
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    /* Prevent line breaks */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .main-header {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        /* Move search below logo/icons on mobile */
        width: 100%;
        margin: 10px 0 0;
        max-width: none;
    }

    .bottom-nav {
        /* Don't hide completely, otherwise fixed nav-links won't show */
        display: block;
        padding: 0;
        height: 0;
        border: none;
        overflow: visible;
    }

    .nav-links {
        /* Keep existing mobile drawer styles */
        position: fixed;
        left: -100%;
        /* ... rest of mobile menu styles ... */
    }

    /* Show mobile menu when active */
    .nav-links.active {
        left: 0;
        display: flex;
        /* Override the 'none' from bottom-nav hide? No, .nav-links is inside .bottom-nav */
    }
}

.nav-links li a:hover {
    color: var(--primary-color);
    background-color: var(--white);
}

/* --- Dropdown Menu --- */
.dropdown-item {
    position: relative;
}

/* Courses & Books hover dropdowns */
.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-color);
    /* Changed to green */
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    display: block;
}

.dropdown-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Bootstrap Profile Dropdown (ensure it works) */
.header-icons .dropdown-menu {
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: var(--white);
    /* Keep profile dropdown white */
}

.header-icons .dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--white);
    /* White text for green background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding-left: 25px;
}

/* Specific override for profile dropdown links to keep them dark */
.header-icons .dropdown-menu a {
    color: var(--text-color);
    border-bottom: 1px solid #f9f9f9;
}

.header-icons .dropdown-menu a:hover {
    background: #f9f9f9;
    color: var(--primary-color);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 15px;
    position: relative;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 50px 0 0 50px;
    outline: none;
    background: #f8f9fa;
    transition: 0.3s;
}

.search-bar button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icons a {
    font-size: 1.2rem;
    color: var(--text-color);
}

.header-icons a:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wishlist-icon {
    position: relative;
}

.wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* --- Sticky Nav --- */
.sticky-nav {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.sticky-nav.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Hero Slider --- */
.hero-slider {
    position: relative;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.slide-content {
    color: var(--white);
    max-width: 600px;
    animation: fadeInUp 1s ease forwards;
}

.slide-content h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background: var(--accent-color);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* --- Browse by Class --- */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.class-card {
    background: var(--white);
    padding: 35px 25px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: none;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
    display: block;
    text-decoration: none !important;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.class-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.class-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
    text-decoration: none !important;
}

.class-card span {
    color: #666;
    font-size: 0.9rem;
    text-decoration: none !important;
}

/* --- Course Cards --- */
.course-card .subjects {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    background: #f0f0f0;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
}

/* --- Special Edition --- */
.special-edition {
    background-color: var(--white);
}

.special-grid {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.special-img {
    flex: 1;
    min-width: 300px;
}

.special-img img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.special-content {
    flex: 1;
    min-width: 300px;
}

.special-content .tag {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.special-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.special-content .desc {
    margin: 20px 0;
    color: #666;
    font-size: 1.1rem;
}

/* --- Categories --- */
.section {
    padding: 60px 0;
    position: relative;
    /* Ensure layout context */
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cat-card {
    position: relative;
    overflow: hidden;
    height: 250px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.cat-card:hover img {
    transform: scale(1.1);
}

.cat-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 4px;
}

.cat-info h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.cat-info a {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* --- Products Section --- */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding-bottom: 5px;
    color: #888;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

/* Force 5 columns on laptop/desktop */
@media (min-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.product-card {
    background: var(--white);
    border: 1px solid #f1f1f1;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* Soft professional shadow */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Ensure uniform height in grid */
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    /* Slightly stronger on hover */
    transform: translateY(-5px);
    border-color: transparent;
}

.prod-img {
    position: relative;
    width: 100%;
    height: 380px;
    /* Increased height for vertical aspect ratio (approx 2:3) */
    overflow: hidden;
    background: #fff;
    /* White background for clean look */
    padding: 10px;
    /* Padding to ensure image doesn't touch edges */
    display: flex;
    justify-content: center;
    align-items: center;
}

.prod-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Shows full book cover without cropping */
    object-position: center;
    transition: transform 0.5s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* Shadow on the book itself */
}

.product-card:hover .prod-img img {
    transform: scale(1.05);
}

/* --- Course Cards Specific Styles --- */
.course-card .prod-img {
    height: 220px;
    background: #f0f0f0;
}

.course-card .prod-img img {
    object-fit: cover;
}

/* Improve Typography for Course Cards */
.course-card .prod-details h4 {
    font-size: 1.3rem;
    /* Bigger Title */
    font-weight: 700;
    margin-bottom: 8px;
    white-space: normal;
    /* Allow title to wrap to 2 lines */
    line-height: 1.4;
    height: 3.6em;
    /* Fixed height for 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.course-card .prod-details .author {
    font-size: 1rem;
    /* Bigger Category */
    color: #555;
    /* Darker gray for better contrast */
    font-weight: 600;
    margin-bottom: 8px;
}

.course-card .subjects {
    font-size: 0.95rem;
    /* Bigger Subjects text */
    color: #444;
    background: #e9ecef;
    /* Slightly darker background */
    padding: 4px 10px;
    margin-bottom: 12px;
}

.course-card .price {
    font-size: 1.2rem;
    /* Bigger Price */
    margin-top: 10px;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 3px;
}

.badge.sale {
    background: #e74c3c;
}

.badge.hot {
    background: #f1c40f;
}

.prod-details {
    padding: 15px;
    text-align: center;
}

.prod-details .author {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.prod-details h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix for Blue Links - Force Green */
.prod-details h4 a,
.product-card h4 a {
    color: var(--primary-color) !important;
}

.price {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.price .old {
    color: #aaa;
    text-decoration: line-through;
    margin-right: 5px;
    font-weight: 400;
}

.add-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0;
    transform: translateY(20px);
    border-radius: 0 0 var(--radius) var(--radius);
}

.product-card:hover .add-cart {
    opacity: 1;
    transform: translateY(0);
}

/* --- Latest News --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: 0.3s;
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.news-img {
    position: relative;
    height: 200px;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-img .date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--white);
    padding: 5px 10px;
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-img .date span {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.news-info {
    padding: 20px;
}

.news-info h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.read-more {
    color: #000;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: var(--primary-color);
}

/* --- Newsletter --- */
.newsletter-section {
    background: var(--light-gray);
    padding: 80px 0;
    text-align: center;
}

.newsletter-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
}

.newsletter-content p {
    margin-bottom: 30px;
    color: #666;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    outline: none;
}

.newsletter-form button {
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.newsletter-form button:hover {
    background: var(--accent-color);
}

/* --- Promo Banner --- */
.promo-banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1516979187457-637abb4f9353?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    text-align: center;
    color: var(--white);
}

.promo-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 15px;
}

.promo-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* --- Footer --- */
footer {
    background: var(--primary-color);
    /* Teal Green */
    color: #ffffff;
    /* White text for contrast */
    padding: 80px 0 30px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.footer-col h3 {
    color: #ffffff;
    /* White headings */
    font-family: var(--font-heading);
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    /* Slightly transparent white links */
}

.footer-links li a:hover {
    color: var(--accent-color) !important;
    padding-left: 5px;
}

.footer-links i {
    margin-right: 10px;
    width: 20px;
}

.social-icons {
    margin-top: 20px;
    margin-bottom: 20px;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    /* Transparent white circles */
    color: var(--white);
    margin-right: 10px;
    border-radius: 50%;
}

.social-icons a:hover {
    background: var(--accent-color) !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle divider */
    padding-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .social-icons {
    margin: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-header {
        padding: 15px 0;
    }

    .logo {
        margin-bottom: 0;
    }

    .logo img {
        height: 45px;
        width: auto;
    }

    .top-bar {
        display: block;
    }
    .top-bar .top-bar-content{
        display:flex;
        justify-content:space-between;
        align-items:center;
        padding:6px 12px;
        font-size:0.85rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }

    /* Header Adjustments */
    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    /* Mobile Header Layout: Toggle - Logo - Icons */
    .mobile-menu-toggle {
        display: block;
        order: 1;
        position: relative;
        z-index: 1200;
    }

    .logo {
        order: 2;
        margin-right: 0;
        flex-grow: 1;
        text-align: center;
    }

    .logo h1 {
        font-size: 1.6rem;
    }

    .header-icons {
        order: 3;
    }

    .search-bar {
        width: 100%;
        max-width: 100%;
        margin: 5px 0 0;
        order: 4;
    }

    /* Mobile Menu */
    .nav-links {
        display: flex;
        flex-direction: column;
        background: var(--primary-color);
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        padding: 80px 20px 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        border-top: none;
        transition: left 0.3s ease;
        z-index: 1100;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
        animation: none;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--white);
    }

    .nav-links li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 25px;
        border-radius: 0;
        color: var(--white);
    }

    .mobile-nav-close {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 1.2rem;
        color: var(--white);
        cursor: pointer;
        width: 35px !important;
        height: 35px;
        text-align: center;
        padding: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
    }

    .nav-links .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 20px;
        display: none;
        width: 100%;
    }

    .nav-links .active-dropdown .dropdown-menu {
        display: block;
    }

    /* Sub-Submenu support on mobile */
    .nav-links .dropdown-submenu {
        display: none;
        position: static;
        padding: 6px 0 6px 15px;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        margin: 6px 0 0;
    }
    .nav-links .dropdown-subitem.active-sub .dropdown-submenu {
        display: block;
    }
    .nav-links .dropdown-submenu a {
        color: var(--white);
        padding: 10px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .hero-slider {
        height: 50vh;
    }

    .slide-content h2 {
        font-size: 2rem;
    }

    .section {
        padding: 40px 0;
        margin-bottom: 20px;
        /* Ensure spacing between sections */
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .prod-img {
        height: 220px;
    }

    .prod-details {
        padding: 10px;
    }

    .prod-details h4 {
        font-size: 0.95rem;
        height: 2.8em;
    }

    .price {
        font-size: 0.9rem;
    }

    .add-cart {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .class-grid {
        grid-template-columns: 1fr 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .special-content h2 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    /* Mobile Filter Toggle */
    .mobile-filter-toggle {
        display: block;
        margin-bottom: 20px;
    }

    .mobile-filter-toggle .btn {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Shop Sidebar Mobile */
    .shop-layout .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        z-index: 10003;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .shop-layout .sidebar.active {
        left: 0;
    }

    .sidebar-close-btn {
        display: block;
        text-align: right;
        margin-bottom: 15px;
    }

    .sidebar-close-btn button {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text-color);
        padding: 5px;
    }

    /* Shop Content Full Width on Mobile */
    .shop-layout {
        grid-template-columns: 1fr !important;
    }

    .shop-content {
        width: 100%;
    }
}

/* Hide mobile filter toggle on desktop */
.mobile-filter-toggle {
    display: none;
}

.sidebar-close-btn {
    display: none;
}

/* Mobile Search Toggle */
.mobile-search-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-search-toggle {
        display: block;
        font-size: 1.2rem;
        color: var(--text-color);
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        margin-right: 15px;
    }

    .search-bar {
        display: none !important;
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
        order: 4;
    }

    .search-bar.active {
        display: flex !important;
        animation: fadeInDown 0.3s ease;
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-nav-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        color: var(--white);
        z-index: 1200;
        cursor: pointer;
        font-size: 1.5rem;
    }

    .mobile-nav-close:hover {
        background: rgba(255, 255, 255, 0.4);
    }
}

/* --- Global Fixes --- */

/* Fix Section Overlap (Global) */
.section {
    overflow: visible;
    /* Changed from hidden to fix desktop UI */
    clear: both;
    position: relative;
    z-index: 1;
    width: 100%;
    background-color: var(--white);
    /* Ensure no transparency overlap */
    margin-bottom: 0;
    /* Let specific sections handle spacing if needed */
}

/* Ensure Popular Courses and Special Edition stack correctly */
.popular-courses {
    position: relative;
    z-index: 2;
}

.special-edition {
    position: relative;
    z-index: 3;
}

.section-header {
    position: relative;
    z-index: 2;
    background: transparent;
}

/* Fix for Blue Links - Force Green Global */
a,
.prod-details h4 a,
.product-card h4 a,
.prod-details a,
.product-card a {
    color: inherit;
    text-decoration: none;
}

.prod-details h4 a,
.product-card h4 a {
    color: var(--primary-color) !important;
}

/* --- Filter Toggle Visibility Fix --- */
.mobile-filter-toggle {
    display: none !important;
    /* Hidden by default (Desktop) */
}

@media (max-width: 992px) {
    .mobile-filter-toggle {
        display: block !important;
        /* Visible on Mobile/Tablet */
        margin-bottom: 20px;
    }

    /* Ensure Sidebar is hidden by default on mobile and shown when active */
    .shop-layout .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        /* Hidden off-screen */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        transition: left 0.3s ease;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        display: block !important;
        /* Override any display:none */
    }

    .shop-layout .sidebar.active {
        left: 0 !important;
        /* Slide in */
    }

    .sidebar-close-btn {
        display: block !important;
        text-align: right;
        margin-bottom: 10px;
    }

    .sidebar-close-btn button {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* Ensure Add to Cart text is always white */
.add-cart,
.product-card a.add-cart,
.prod-details a.add-cart {
    color: var(--white) !important;
}

.add-cart:hover,
.product-card a.add-cart:hover,
.prod-details a.add-cart:hover {
    color: var(--white) !important;
}

/* --- Pagination --- */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 20px 0;
    width: 100%;
}

.pagination {
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f8f9fa;
    color: var(--text-color);
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.page-link:hover {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-link.active {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-link i {
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .pagination {
        gap: 5px;
    }
    
    .page-link {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 0.85rem;
    }
}

/* Breadcrumb Overrides */
.page-header-bg .breadcrumb a,
.breadcrumb a {
    color: #000 !important;
    text-decoration: none !important;
}
.page-header-bg .breadcrumb span,
.breadcrumb span,
.breadcrumb {
    color: #000 !important;
}
/* Ensure no underline on hover either */
.breadcrumb a:hover {
    color: #000 !important;
    text-decoration: none !important;
}
