/* 
 * Oleng Discover Page - Premium CSS
 */

:root {
    --oleng-main-bg: #F8FBF9;
    --oleng-card-bg: rgba(255, 255, 255, 0.7);
    --oleng-text-dark: #1A1A1A;
    --oleng-text-muted: #666;
    --theme-color: #52B788; /* dynamically updated */
}

#oleng-discover-root {
    font-family: var(--font-primary, 'Inter', sans-serif);
    color: var(--oleng-text-dark);
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 80vh;
}

/* ─────────────────────────────────────────────────────────
   TABS NAV
───────────────────────────────────────────────────────── */
.oleng-discover-header {
    text-align: center;
    margin-bottom: 3rem;
}
.oleng-discover-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--theme-color) 0%, #1A1A1A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background 0.4s ease;
}

.oleng-discover-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 0.5rem;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: max-content;
    margin: 0 auto 3rem auto;
}

.oleng-tab {
    padding: 0.75rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--oleng-text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.oleng-tab:hover {
    color: var(--theme-color);
    background: rgba(82, 183, 136, 0.1);
}

.oleng-tab.active {
    background: var(--theme-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────
   BREADCRUMBS
───────────────────────────────────────────────────────── */
.oleng-discover-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--oleng-text-muted);
}
.bc-item {
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
}
.bc-item:not(.active):hover {
    color: var(--theme-color);
}
.bc-item.active {
    color: var(--theme-color);
    font-weight: 700;
    cursor: default;
}
.bc-sep {
    font-size: 0.7rem;
    opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────
   CATEGORY GRID (GLASSMORPHISM)
───────────────────────────────────────────────────────── */
.oleng-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.oleng-cat-card {
    background: var(--oleng-card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.oleng-cat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
    pointer-events: none;
}

.oleng-cat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--theme-color);
}

.oleng-cat-card .cat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    transition: transform 0.3s;
}

.oleng-cat-card:hover .cat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.cat-content {
    position: relative;
    z-index: 2;
    flex-grow: 1;
}

.cat-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.cat-count {
    font-size: 0.85rem;
    color: var(--oleng-text-muted);
    font-weight: 600;
}

.cat-children-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    position: relative;
    z-index: 2;
}

.cat-children-preview span {
    font-size: 0.75rem;
    background: rgba(0,0,0,0.04);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    color: var(--oleng-text-muted);
}

.cat-action {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    font-size: 1.2rem;
    color: var(--theme-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    z-index: 2;
}

.oleng-cat-card:hover .cat-action {
    opacity: 1;
    transform: translateX(0);
}

/* ─────────────────────────────────────────────────────────
   CATEGORY VIEW (Drill down)
───────────────────────────────────────────────────────── */
.oleng-category-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.cat-icon-large {
    font-size: 4rem;
}

.oleng-category-header h2 {
    font-size: 2.2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 800;
}

.oleng-category-header p {
    margin: 0;
    color: var(--oleng-text-muted);
    font-size: 1.1rem;
}

.oleng-subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.oleng-subcat-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.oleng-subcat-pill:hover {
    border-color: var(--theme-color);
    color: var(--theme-color);
    transform: translateY(-2px);
}

.oleng-subcat-pill i {
    color: var(--theme-color);
}

.oleng-subcat-pill small {
    background: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

/* ─────────────────────────────────────────────────────────
   LISTINGS GRID
───────────────────────────────────────────────────────── */
.mt-4 { margin-top: 2rem; }

.oleng-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.oleng-listing-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--oleng-text-dark);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.oleng-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.listing-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.listing-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
}

.listing-badge.premium {
    background: linear-gradient(135deg, #F39C12 0%, #D35400 100%);
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.4);
}

.listing-badge.featured {
    background: linear-gradient(135deg, var(--theme-color) 0%, #2D6A4F 100%);
}

.listing-price {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
}

.listing-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.listing-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--oleng-text-muted);
    margin-bottom: 1rem;
}

.listing-meta i {
    color: var(--theme-color);
}

.listing-tags {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.listing-tags span {
    font-size: 0.7rem;
    background: rgba(0,0,0,0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    color: var(--oleng-text-muted);
}

/* ─────────────────────────────────────────────────────────
   UTILITIES & ANIMATIONS
───────────────────────────────────────────────────────── */
.oleng-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--oleng-text-muted);
}

.oleng-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0,0,0,0.05);
    border-radius: 50%;
    border-top-color: var(--theme-color);
    animation: spin 1s infinite linear;
    margin-bottom: 1rem;
}

.oleng-empty-state {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 20px;
    color: var(--oleng-text-muted);
}
.oleng-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .oleng-discover-tabs {
        flex-direction: column;
        width: 100%;
        border-radius: 15px;
        padding: 1rem;
    }
    .oleng-tab {
        text-align: center;
        justify-content: center;
    }
    .oleng-category-header {
        flex-direction: column;
        text-align: center;
    }
}
