﻿
/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    padding: 56px 0 40px;
    color: #fff;
}

    .page-hero h1 {
        font-size: 32px;
        font-weight: 800;
        margin-bottom: 8px;
    }

    .page-hero p {
        color: rgba(255, 255, 255, .7);
        font-size: 15px;
    }

/* Alphabet Bar */
.alpha-bar {
    background: #fff;
    border-bottom: 1px solid #eaeef2;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.alpha-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.alpha-btn {
    min-width: 32px;
    height: 32px;
    border: 1.5px solid #e0e6ef;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .alpha-btn:hover, .alpha-btn.active {
        background: #0f3460;
        border-color: #0f3460;
        color: #fff;
    }

    .alpha-btn.disabled {
        opacity: .3;
        cursor: not-allowed;
    }

.alpha-all {
    padding: 0 12px;
    font-size: 12px;
}

/* Content */
.products-page {
    padding: 48px 0 80px;
    background: #f4f7fb;
    min-height: 60vh;
}

/* Category Group (Level 1) */
.cat-group-l1 {
    margin-bottom: 48px;
}

.cat-group-l1-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cat-group-l1-letter {
    font-size: 13px;
    font-weight: 800;
    color: #e94560;
    text-transform: uppercase;
    letter-spacing: 2px;
}

    .cat-group-l1-letter::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #e0e6ef;
        margin-left: 12px;
    }

/* Level 1 Category Card */
.cat-l1-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
    margin-bottom: 24px;
}

.cat-l1-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #eaeef2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cat-l1-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .cat-l1-title h3 {
        font-size: 18px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0;
    }

.cat-l1-count {
    font-size: 13px;
    color: #888;
    background: #e0e6ef;
    padding: 4px 10px;
    border-radius: 20px;
}

.cat-l1-body {
    padding: 20px 24px;
}

/* Level 2 Grid */
.cat-l2-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.cat-l2-item {
    background: #f8fafc;
    border: 1px solid #e0e6ef;
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all .2s;
}

    .cat-l2-item:hover {
        background: #eef2ff;
        border-color: #0f3460;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(15,52,96,.1);
    }

.cat-l2-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f3460;
}

.cat-l2-count {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* Level 3 (collapsed by default) */
.cat-l3-toggle {
    font-size: 12px;
    color: #e94560;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background .15s;
}

    .cat-l3-toggle:hover {
        background: #fef2f4;
    }

.cat-l3-list {
    display: none;
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid #e0e6ef;
}

    .cat-l3-list.show {
        display: block;
    }

.cat-l3-item {
    display: block;
    padding: 6px 0;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: color .15s;
}

    .cat-l3-item:hover {
        color: #e94560;
    }

    .cat-l3-item span {
        color: #999;
        font-size: 12px;
        margin-left: 6px;
    }

/* Search */
.search-row {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eaeef2;
}

.search-box {
    display: flex;
    align-items: center;
    border: 2px solid #e0e6ef;
    border-radius: 10px;
    overflow: hidden;
    max-width: 420px;
}

    .search-box input {
        flex: 1;
        padding: 11px 16px;
        border: none;
        outline: none;
        font-size: 14px;
    }

    .search-box button {
        padding: 11px 18px;
        background: #0f3460;
        border: none;
        color: #fff;
        cursor: pointer;
        font-size: 14px;
        transition: background .2s;
    }

        .search-box button:hover {
            background: #e94560;
        }

/* Stats */
.stats-row {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

    .stat-icon.cats {
        background: #dcfce7;
        color: #16a34a;
    }

    .stat-icon.prods {
        background: #e0e7ff;
        color: #4f46e5;
    }

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

/* Empty / Loading */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

    .empty-state i {
        font-size: 48px;
        color: #d0dae8;
        margin-bottom: 16px;
    }

@media (max-width: 1024px) {
    .cat-l2-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

@media (max-width: 640px) {
    .cat-l2-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 480px) {
    .cat-l2-grid {
        grid-template-columns: 1fr;
    }
}