/*
Theme Name: LingoPath
Author: Antigravity
Description: Custom theme for LingoPath with robust menu and schema markup features.
Version: 1.1
*/

:root {
    --primary-color: #3b82f6;
    --text-color: #333;
    --bg-color: #fff;
    --font-main: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll from full-width elements */
}

/* =========================================
   Robust Menu Styling
   ========================================= */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation ul li a:hover {
    color: var(--primary-color);
}

.main-navigation ul li.btn-cta a {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
}

/* =========================================
   Full Width Banner (Hero)
   ========================================= */
.hero-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f3f4f6;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 0.5rem;
    font-weight: bold;
}

.btn-secondary {
    background: #fff;
    color: var(--text-color);
}

/* =========================================
   Sections
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    border: 1px solid #eee;
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Footer */
.site-footer {
    background: #f9fafb;
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    text-decoration: none;
    color: #666;
}

/* =========================================
   Utility & New Components
   ========================================= */

/* Header Actions Alignment */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Full Width Backgrounds */
.section-full-width {
    width: 100%;
}

.bg-gray {
    background-color: #f9fafb;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation ul li a:hover {
    color: var(--primary-color);
}

.main-navigation ul li.btn-cta a {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
}

/* =========================================
   Full Width Banner (Hero)
   ========================================= */
.hero-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f3f4f6;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 0.5rem;
    font-weight: bold;
}

.btn-secondary {
    background: #fff;
    color: var(--text-color);
}

/* =========================================
   Sections
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    border: 1px solid #eee;
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Footer */
.site-footer {
    background: #f9fafb;
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    text-decoration: none;
    color: #666;
}

/* =========================================
   Utility & New Components
   ========================================= */

/* Header Actions Alignment */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Full Width Backgrounds */
.section-full-width {
    width: 100%;
}

.bg-gray {
    background-color: #f9fafb;
}

.section-full-width .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* =========================================
   Resources / Blog Page Styling
   ========================================= */

/* Resources Hero */
.resources-hero {
    background-color: #fff8f0;
    /* Warm light beige/yellowish bg like design */
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-decoration {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-decoration img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
}

.hero-title-small {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-subtitle-small {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Search Form */
.search-form-large {
    display: flex;
    width: 100%;
    background: #fff;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.search-field-large {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-submit-large {
    padding: 0.8rem 2rem;
    background-color: #3b82f6;
    /* Blue button */
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.search-submit-large:hover {
    background-color: #2563eb;
}

/* Layout: Sidebar + Content */
.resources-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-top: 3rem;
}

.resources-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.resources-content {
    flex: 1;
}

@media (max-width: 900px) {
    .resources-layout {
        flex-direction: column;
    }

    .resources-sidebar {
        width: 100%;
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-decoration {
        justify-content: center;
    }
}

/* Sidebar Widget */
.sidebar-widget {
    background: #fff;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #111;
}

.widget-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.category-list li a:hover {
    background-color: #f3f4f6;
    color: #111;
}

.category-list li.current-cat a {
    background-color: #dbeafe;
    /* Light blue active bg */
    color: #1e40af;
    /* Dark blue active text */
    font-weight: 600;
}

.category-list .icon {
    margin-right: 0.8rem;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Toolbar */
.resources-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    /* border-bottom: 1px solid #eee; */
    padding-bottom: 1rem;
}

.sort-label {
    margin-right: 1rem;
    font-weight: 600;
    color: #333;
}

.sort-options {
    display: flex;
    gap: 0.5rem;
}

.sort-btn {
    padding: 0.4rem 1rem;
    text-decoration: none;
    color: #4b5563;
    border-radius: 20px;
    /* Pill shape */
    font-size: 0.9rem;
    background: #e5e7eb;
    transition: all 0.2s;
}

.sort-btn.active,
.sort-btn:hover {
    background: #dbeafe;
    color: #1e40af;
}

/* Article Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.article-thumb {
    height: 200px;
    background-color: #e5e7eb;
    overflow: hidden;
    position: relative;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-thumb img {
    transform: scale(1.05);
}

.placeholder-thumb {
    width: 100%;
    height: 100%;
    background: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.article-body {
    padding: 1.5rem 0;
}

.cat-label {
    color: #059669;
    /* Green like design */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 700;
}

.article-title a {
    text-decoration: none;
    color: #111;
    transition: color 0.2s;
}

.article-title a:hover {
    color: #3b82f6;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.read-time {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #333;
    border-radius: 50%;
    /* Circle */
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination .current {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* =========================================
   Learning Materials Page Styling
   ========================================= */

.materials-page {
    background-color: #f8f9fa;
    padding-bottom: 4rem;
}

.breadcrumbs {
    padding: 1.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #212529;
    font-weight: 800;
}

/* Top Bar */
.materials-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.active-tag {
    background: #e7f1ff;
    color: #0d6efd;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    background: #e5e7eb;
    transition: all 0.2s;
}

.sort-btn.active,
.sort-btn:hover {
    background: #dbeafe;
    color: #1e40af;
}

/* Article Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.article-thumb {
    height: 200px;
    background-color: #e5e7eb;
    overflow: hidden;
    position: relative;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-thumb img {
    transform: scale(1.05);
}

.placeholder-thumb {
    width: 100%;
    height: 100%;
    background: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.article-body {
    padding: 1.5rem 0;
}

.cat-label {
    color: #059669;
    /* Green like design */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 700;
}

.article-title a {
    text-decoration: none;
    color: #111;
    transition: color 0.2s;
}

.article-title a:hover {
    color: #3b82f6;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.read-time {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #333;
    border-radius: 50%;
    /* Circle */
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination .current {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* =========================================
   Learning Materials Page Styling
   ========================================= */

.materials-page {
    background-color: #f8f9fa;
    padding-bottom: 4rem;
}

.breadcrumbs {
    padding: 1.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #212529;
    font-weight: 800;
}

/* Top Bar */
.materials-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.active-tag {
    background: #e7f1ff;
    color: #0d6efd;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    background: #e5e7eb;
    transition: all 0.2s;
}

.sort-btn.active,
.sort-btn:hover {
    background: #dbeafe;
    color: #1e40af;
}

/* Article Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.article-thumb {
    height: 200px;
    background-color: #e5e7eb;
    overflow: hidden;
    position: relative;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-thumb img {
    transform: scale(1.05);
}

.placeholder-thumb {
    width: 100%;
    height: 100%;
    background: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.article-body {
    padding: 1.5rem 0;
}

.cat-label {
    color: #059669;
    /* Green like design */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 700;
}

.article-title a {
    text-decoration: none;
    color: #111;
    transition: color 0.2s;
}

.article-title a:hover {
    color: #3b82f6;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.read-time {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #333;
    border-radius: 50%;
    /* Circle */
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination .current {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* =========================================
   Learning Materials Page Styling
   ========================================= */

.materials-page {
    background-color: #f8f9fa;
    padding-bottom: 4rem;
}

.breadcrumbs {
    padding: 1.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #212529;
    font-weight: 800;
}

/* Top Bar */
.materials-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.active-tag {
    background: #e7f1ff;
    color: #0d6efd;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-tag {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select {
    padding: 0.4rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #f8f9fa;
}

/* Layout */
.materials-layout {
    display: flex;
    gap: 2rem;
}

.materials-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.materials-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .materials-layout {
        flex-direction: column;
    }

    .materials-sidebar {
        width: 100%;
    }
}

/* Sidebar Filters */
.filter-group {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Custom Checkbox */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #495057;
    position: relative;
    padding-left: 30px;
}

.checkbox-label input,
.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.checkbox-label:hover input~.checkmark {
    background-color: #f1f3f5;
}

.checkbox-label input:checked~.checkmark {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked~.checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio */
.radio-mark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 50%;
}

.radio-label input:checked~.radio-mark {
    background-color: #fff;
    border-color: #0d6efd;
}

.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-label input:checked~.radio-mark:after {
    display: block;
}

.radio-label .radio-mark:after {
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
}

/* Filter Buttons */
.btn-apply-filters {
    width: 100%;
    padding: 0.8rem;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.btn-clear-filters {
    width: 100%;
    padding: 0.8rem;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Product Cards */
.material-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card-thumb-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio (Square) */
    background: #f1f3f5;
    overflow: hidden;
}

.card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    z-index: 2;
    text-transform: uppercase;
}

.badge-bestseller {
    background: #fd7e14;
}

.badge-new {
    background: #20c997;
}

.filter-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Custom Checkbox */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #495057;
    position: relative;
    padding-left: 30px;
}

.checkbox-label input,
.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.checkbox-label:hover input~.checkmark {
    background-color: #f1f3f5;
}

.checkbox-label input:checked~.checkmark {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked~.checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio */
.radio-mark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 50%;
}

.radio-label input:checked~.radio-mark {
    background-color: #fff;
    border-color: #0d6efd;
}

.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-label input:checked~.radio-mark:after {
    display: block;
}

.radio-label .radio-mark:after {
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
}

/* Filter Buttons */
.btn-apply-filters {
    width: 100%;
    padding: 0.8rem;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.btn-clear-filters {
    width: 100%;
    padding: 0.8rem;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Product Cards */
.material-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card-thumb-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio (Square) */
    background: #f1f3f5;
    overflow: hidden;
}

.card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    z-index: 2;
    text-transform: uppercase;
}

.badge-bestseller {
    background: #fd7e14;
}

.badge-new {
    background: #20c997;
}

.badge-sale {
    background: #dc3545;
}

.card-content {
    padding: 1rem 1rem 0.5rem 1rem;
    /* Reduced bottom padding */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    /* 16px */
    margin-bottom: 0.4rem;
    line-height: 1.4;
    font-weight: 600;
    /* Semibold */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    /* Ensure consistent height for 2 lines */
}

.card-title a {
    text-decoration: none;
    color: #212529;
}

.card-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.card-footer {
    margin-top: 0.5rem;
    /* Pulled closer to content */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-price {
    font-size: 1.375rem;
    /* ~22px */
    font-weight: 600;
    /* Semibold */
    color: #0d6efd;
}

.btn-add-cart {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e7f1ff;
    color: #0d6efd;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-cart:hover {
    background: #0d6efd;
    color: #fff;
    color: #fff;
}

/* Pagination */
.materials-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.materials-pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #495057;
    border-radius: 6px;
}

.materials-pagination .current {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}