/* ── Page layout ────────────────────────────────────────────── */
.selcat-page {
    display: flex;
    font-family: Arial, Helvetica, sans-serif;
    background: #f9fafb;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.selcat-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 1.5rem 1rem;
    position: sticky;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

.selcat-sidebar h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin: 0 0 1rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.selcat-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #444;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.selcat-filter:hover { background: #f3f4f6; }

.selcat-filter.active {
    background: #081f3f;
    color: #fff;
}

.selcat-filter.active .selcat-count { background: rgba(255,255,255,0.2); color: #fff; }

.selcat-count {
    margin-left: auto;
    font-size: 0.75rem;
    background: #f0f0f0;
    color: #666;
    padding: 2px 7px;
    border-radius: 99px;
    font-weight: 600;
}

/* ── Main ───────────────────────────────────────────────────── */
.selcat-main {
    flex: 1;
    padding: 2rem;
    min-width: 0;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.selcat-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.selcat-title h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #081f3f;
    margin: 0;
}

.selcat-total {
    font-size: 0.85rem;
    color: #888;
}

/* ── Search ─────────────────────────────────────────────────── */
.selcat-search {
    display: flex;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.selcat-search input {
    border: none;
    outline: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    width: 220px;
    background: transparent;
}

.selcat-search button {
    background: #081f3f;
    color: #fff;
    border: none;
    padding: 0 14px;
    cursor: pointer;
    transition: background 0.18s;
}

.selcat-search button:hover { background: #C8833A; }

/* ── Grid ───────────────────────────────────────────────────── */
.selcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* ── Shop card (shared with index) ─────────────────────────── */
.shop-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.shop-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.shop-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-image {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.shop-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.shop-card:hover .shop-image img { transform: scale(1.04); }

.shop-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #C8833A;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
}

.shop-info {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #081f3f;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-info p {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(0.8rem * 1.4 * 2); /* reserves space for exactly 2 lines even if shorter */
}

.shop-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding: 7px 14px;
    background: #081f3f;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.18s;
}

.shop-addr {
    font-size: 0.78rem !important;
    color: #999 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    align-items: flex-start;
    gap: 4px;
}

.shop-card:hover .shop-view-btn { background: #C8833A; }

/* ── Empty state ────────────────────────────────────────────── */
.selcat-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #aaa;
}

.selcat-empty i { font-size: 3rem; display: block; margin-bottom: 1rem; }
.selcat-empty p { margin-bottom: 1rem; font-size: 1rem; }

.selcat-reset {
    display: inline-block;
    padding: 8px 20px;
    background: #081f3f;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ── Pagination ─────────────────────────────────────────────── */
.selcat-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 2rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid #ddd;
    text-decoration: none;
    color: #333;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s;
}

.page-btn:hover { background: #f3f4f6; border-color: #aaa; }
.page-btn.active { background: #081f3f; color: #fff; border-color: #081f3f; }

/* ── Categories carousel (home page) ───────────────────────── */
.cat-section {
    padding: 1.5rem 2rem 1rem;
}

.cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cat-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #081f3f;
}

.cat-search-form {
    display: flex;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.cat-search-form input {
    border: none;
    outline: none;
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    width: 200px;
}

.cat-search-form button {
    background: #081f3f;
    color: #fff;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    transition: background 0.18s;
}

.cat-search-form button:hover { background: #C8833A; }

.cat-track-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px 12px;
    scrollbar-width: none;
}

.cat-track::-webkit-scrollbar { display: none; }

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
    width: 90px;
    transition: transform 0.18s;
}

.cat-item:hover { transform: translateY(-3px); }

.cat-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #C8833A;
    transition: background 0.18s, border-color 0.18s;
}

.cat-item:hover .cat-circle {
    background: #fff3e8;
    border-color: #C8833A;
}

.cat-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #081f3f;
    text-align: center;
    line-height: 1.2;
}

.cat-count {
    font-size: 0.7rem;
    color: #999;
}

.cat-arrow {
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.85rem;
    color: #333;
}

.cat-arrow:hover { background: #f3f4f6; border-color: #aaa; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .selcat-page { flex-direction: column; }
    .selcat-sidebar {
        width: 100%;
        height: auto;
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 1rem;
    }
    .selcat-sidebar h3 { width: 100%; }
    .selcat-main { padding: 1rem; }
    .selcat-topbar { flex-direction: column; align-items: flex-start; }
    .selcat-search input { width: 160px; }
    .selcat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}