/* =========================
   1. MAIN LAYOUT & CONTAINER
========================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}


/* =========================
   3.  HEAD
========================= */
.head {
    margin: 0 0 18px;
}

.head__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    color: var(--text-dark);
    font-weight: 700;
}

.head__desc {
    margin: 8px 0 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* =========================
   4. CATEGORIES (SCROLLABLE)
========================= */
.category {
    margin: 0 0 18px;
}

.category--scroll {
    overflow: hidden;
}

.category__scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.category__scroller::-webkit-scrollbar {
    height: 6px;
}

.category__scroller::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 999px;
}

.category__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.category__link:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.category__link--active {
    background: var(--bg-color);
    color: var(--brand-color);
    border-color: var(--brand-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* =========================
   5. PANEL & HEADERS
========================= */
.panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.panel__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

/* =========================
   6. VIEW SWITCH & SELECT
========================= */
.view-switch {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.view-switch__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.view-switch__link:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.view-switch__link.is-active {
    background: var(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.view-select {
    position: relative;
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
}

.view-select__control {
    width: 100%;
    height: 34px;
    padding: 0 32px 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.view-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 11px;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
    pointer-events: none;
}

/* =========================
   7. GRID SYSTEM (6-COLUMN)
========================= */
.featured__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.featured__item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.featured__card {
    height: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    text-align: center;
    transition: var(--transition);
}

.featured__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.featured__thumb-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 8px;
}

.featured__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: var(--bg-color);
}

.featured__name {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--text-dark);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* =========================
   8. LOAD MORE & STATUS
========================= */
.loadmore-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.loadmore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--brand-color);
    border-radius: 999px;
    background: var(--brand-color);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.loadmore-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* =========================
   9. DARK MODE SUBTLETIES
========================= */
body.dark-mode .featured__card:hover,
body.dark-mode .category__link--active,
body.dark-mode .view-switch__link.is-active {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

/* =========================
   10. RESPONSIVE DESIGN
========================= */
@media (max-width: 1200px) {
    .featured__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .featured__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .head__title { font-size: 25px; }
}

@media (max-width: 768px) {
    .container { padding: 12px; }
    .head__title { font-size: 22px; }
    .panel__title { font-size: 18px; }
    .featured__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .view-switch { width: 100%; }
}

@media (max-width: 480px) {
    .panel__head {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .panel__title {
        flex: 1 1 auto;
        min-width: 0;
        margin-right: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 17px;
    }

    .view-select {
        flex: 0 0 120px;
        width: 120px;
        max-width: 120px;
    }

    .view-select__control {
        height: 30px;
        font-size: 12px;
        padding: 0 28px 0 8px;
    }

    .featured__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .head__title { font-size: 20px; }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}