/* ==========================================================================
   CATALOGS PAGE STYLES - M3 PIXEL AESTHETIC (SEARCH & FILTERS)
   ========================================================================== */

/* 1. Page Header */
.page-header {
    padding: 80px 24px 24px;
    text-align: center;
}
.page-header .display-large { margin-bottom: 16px; letter-spacing: -0.5px; }
.page-header .body-large { opacity: 0.8; }

/* 2. Controls Section (Search + Filters) */
.controls-section {
    max-width: 800px;
    margin: 0 auto 56px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* M3 Search Pill (Google Pixel Widget Style) */
.search-container {
    position: relative;
    width: 100%;
    max-width: 640px;
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--md-sys-color-on-surface);
    opacity: 0.6;
    font-size: 26px;
    pointer-events: none; 
    transition: color 0.4s var(--md-sys-motion-easing-emphasized), 
                opacity 0.4s var(--md-sys-motion-easing-emphasized);
}

.m3-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 24px 20px 64px; 
    background-color: var(--md-sys-color-surface-container-high);
    border: 2px solid transparent;
    border-radius: var(--md-sys-shape-corner-full); 
    font-family: inherit;
    font-size: 17px; 
    color: var(--md-sys-color-on-surface);
    /* Buttery smooth Pixel transitions */
    transition: all 0.4s var(--md-sys-motion-easing-emphasized);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    outline: none;
}

.m3-search-input:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    /* Απαλό state layer στο hover */
    filter: brightness(0.95);
}

body.dark-mode .m3-search-input:hover { filter: brightness(1.1); }

/* Focus State: Το "ξύπνημα" της αναζήτησης */
.m3-search-input:focus {
    background-color: var(--md-sys-color-surface);
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
    filter: brightness(1);
}

body.dark-mode .m3-search-input:focus {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.m3-search-input:focus + .search-icon, 
.search-container:focus-within .search-icon {
    color: var(--md-sys-color-primary);
    opacity: 1;
}

.m3-search-input::placeholder {
    color: var(--md-sys-color-on-surface);
    opacity: 0.5;
}

/* Φίλτρα M3 (Material 3 Filter Chips) */
.filter-wrapper { width: 100%; }
.filter-container {
    display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}

.m3-filter-chip {
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    padding: 10px 20px;
    border-radius: var(--md-sys-shape-corner-full); 
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.4s var(--md-sys-motion-easing-emphasized);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.m3-filter-chip:hover {
    background-color: var(--md-sys-color-surface-container-low);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.m3-filter-chip .material-symbols-rounded { font-size: 18px; display: none; }

/* Active Chip State */
.m3-filter-chip.active {
    background-color: var(--md-sys-color-secondary);
    color: var(--md-sys-color-on-secondary);
    border-color: transparent; 
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); 
    transform: translateY(-2px);
}
.m3-filter-chip.active .material-symbols-rounded { display: inline-block; }


/* 3. Κατάλογοι / Κάρτες Grid (M3 Cards) */
.catalogs-section { max-width: 1200px; margin: 0 auto 80px; padding: 0 24px; min-height: 400px; }

.m3-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.m3-card {
    background-color: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-extra-large); 
    padding: 24px;
    display: flex; flex-direction: column;
    transition: all 0.4s var(--md-sys-motion-easing-emphasized); 
    box-shadow: var(--md-sys-elevation-1); 
    will-change: transform, box-shadow;
}

.m3-card:hover {
    box-shadow: var(--md-sys-elevation-2); 
    transform: translateY(-6px) scale(1.01);
    background-color: var(--md-sys-color-surface-container);
    border-color: transparent;
}

body.dark-mode .m3-card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.m3-card-header { margin-bottom: 20px; display: flex; align-items: center; gap: 16px; }

.card-icon-wrapper {
    /* Δυναμικό gradient αντί για στατικό χρώμα */
    background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-surface) 100%);
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 20px; 
    flex-shrink: 0;
    border: 1px solid var(--md-sys-color-surface-container-high);
}
.card-icon { font-size: 32px; color: var(--md-sys-color-primary); }

.card-title-area { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.m3-card-header .title-large { font-size: 20px; line-height: 1.2; font-weight: 600; color: var(--md-sys-color-on-surface); letter-spacing: -0.2px;}

.m3-badge {
    background-color: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 8px;
}

.m3-card-content { flex-grow: 1; margin-bottom: 32px; color: var(--md-sys-color-on-surface); opacity: 0.8;}

.m3-card-actions {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid var(--md-sys-color-surface-container-high);
    padding-top: 20px;
}

.file-info {
    font-size: 13px;
    color: var(--md-sys-color-on-surface);
    opacity: 0.6;
    font-weight: 500;
}

/* 4. Tο νέο Empty State (No Results) */
.empty-state-container {
    text-align: center;
    padding: 64px 24px;
    background-color: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-extra-large);
    max-width: 600px;
    margin: 40px auto;
    border: 2px dashed var(--md-sys-color-surface-container-high);
}

.empty-icon-wrapper {
    background-color: var(--md-sys-color-surface-container-high);
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
}

.empty-icon {
    font-size: 40px;
    color: var(--md-sys-color-on-surface);
    opacity: 0.4;
}

.empty-state-container .title-large { margin-bottom: 8px; color: var(--md-sys-color-on-surface); font-weight: 600; letter-spacing: -0.3px;}
.empty-state-container .body-large { opacity: 0.7; font-size: 15px; }


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-header { padding: 48px 24px 24px; }
    
    .m3-search-input { font-size: 16px; padding: 16px 20px 16px 56px; }
    .search-icon { font-size: 22px; left: 20px; }
    
    .filter-container { 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        justify-content: flex-start;
        padding-bottom: 8px; 
        /* Ομαλό σκρολάρισμα στα κινητά */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch; 
    }
    .filter-container::-webkit-scrollbar { display: none; } 
    .m3-filter-chip { flex-shrink: 0; } 
    
    .m3-card-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FEATURED CATALOG BANNER (Για τον Γενικό Τιμοκατάλογο)
   ========================================================================== */
.m3-featured-catalog {
    background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-surface) 100%);
    border: 1px solid var(--md-sys-color-primary);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 32px 40px;
    margin-top: 56px; /* ΑΛΛΑΓΗ ΕΔΩ: Κενό από πάνω */
    margin-bottom: 0; /* ΑΛΛΑΓΗ ΕΔΩ: Μηδέν από κάτω */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: var(--md-sys-elevation-1);
    transition: all 0.4s var(--md-sys-motion-easing-emphasized);
}

body.dark-mode .m3-featured-catalog {
    background: linear-gradient(135deg, rgba(10, 58, 106, 0.4) 0%, var(--md-sys-color-surface-container-low) 100%);
    border-color: rgba(0, 195, 255, 0.3);
}

.m3-featured-catalog:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-sys-elevation-2);
}

.featured-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Το Λογότυπο της ΔΕΧΡΩ στο Featured Banner */
.featured-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: var(--md-sys-color-surface);
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.featured-text h2 {
    color: var(--md-sys-color-on-surface);
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.featured-text p {
    color: var(--md-sys-color-on-surface);
    opacity: 0.8;
    font-size: 16px;
    max-width: 600px;
}

/* Προσθήκη στο υπάρχον Mobile Query (γραμμή ~160 του catalogs.css) */
@media (max-width: 768px) {
    .m3-featured-catalog {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    .featured-content {
        flex-direction: column;
        gap: 16px;
    }
    .m3-featured-catalog .m3-button-filled {
        width: 100%;
        justify-content: center;
    }
}

.category-icon-bg {
    width: 100%;
    height: 100%;
    background: var(--md-sys-color-surface-variant);
    display: flex;
    justify-content: center;
    align-items: center;
}